Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I have Linpus Lite preinstalled on the 8GB SSD of my Acer Aspire One. I cloned the Linux partition onto a USB flash drive (UFD) using CloneZilla. When I boot ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7

    Install Linux to USB drive by cloning?


    I have Linpus Lite preinstalled on the 8GB SSD of my Acer Aspire One. I cloned the Linux partition onto a USB flash drive (UFD) using CloneZilla. When I boot my AA1 from the UFD, I get the grub> prompt. What is the problem? Is it possible to modify a few configuration files to get it boot properly?

    I also tried cloning using g4l and GParted, but the result is worse - I just get a black screen or gibberish. What is wrong?

    Many TIAs!

    wywong

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    I'd suggest running the "fdisk -l" command as root and posting that information here. Do it with both drives (SSD/UFD) attached. What does your /boot/grub/menu.lst file look like?

    If you clone the SSD to the UFD, the boot information will be identical for each drive. Do you have both drives attached when trying to boot from the UFD?

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7

    My configuration

    When booting from UFD, SSD is attached, because it is inside the AA1 and I have no way of disabling it. So I guess the UFD will become sdb rather than sda. And I guess modifying a few configuration files should allow booting from sdb. Correct me if I am wrong.

    The following info is obtained after booting from SSD and then the UFD plugged in.

    fdisk -l reports:

    Disk /dev/sda: 8069 MB, 8069677056 bytes
    255 heads, 63 sectors/track, 981 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8df6e0f0

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 850 6827593+ 83 Linux
    /dev/sda2 851 981 1052257+ 82 Linux swap / Solaris

    Disk /dev/sdb: 7506 MB, 7506796544 bytes
    255 heads, 63 sectors/track, 912 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x8df6e0f0

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 850 6827593+ 83 Linux
    /dev/sdb2 851 912 498015 82 Linux swap / Solaris

    Since my UFD has a slightly small capacity than the SSD, I have to use a smaller swap partition on the UFD.

    The directory /boot/grub contains:

    device.map e2fs_stage1_5 fat_stage1_5 ffs_stage1_5
    grub.conf iso9660_stage1_5 jfs_stage1_5 minix_stage1_5
    reiserfs_stage1_5 splash.xpm.gz stage1 stage2 ufs2_stage1_5
    vstafs_stage1_5 xfs_stage1_5

    There is no menu.lst! I think in this distro, grub.conf specifies no menu. File grub.conf contains:

    default=0
    timeout=0
    splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    hiddenmenu

    title Linpus Linux RCD
    rootnoverify (hd0,0)
    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer
    initrd /boot/initrd-splash.img

    I tried changing (hd0,0) to (hd1,1) on UFD but still got grub> prompt on booting.

    Thanks for reading.

    wywong

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    You should add the following to the SSD grub.conf file:

    title Linpus Lite2 (you can name this whatever you wish)
    root (hd1,0)
    chainloader +1

    You must do this as root user. You could also copy the entry you have for the first drive and just change the root entry to above. If your SSD drive goes bad and you want to be able to boot from the UFD you will need to be able to make that change in your BIOS, to boot first from UFD.

  6. #5
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7
    I added the 3 lines as suggested but still got the same grub> prompt. I typed the root command line at the grub> prompt and it responded OK. I typed the chainloader command line and it said:

    Error 13: Invalid or unsupported executable format

    I suspected the MBR on UFD was to blame because I was not sure if CloneZilla had copied the MBR. So I typed the following at the grub prompt to try booting from SSD:

    root (hd0,0)
    chainloader +1

    Again I got the same Error 13 message. I ignored the message and typed

    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer
    initrd /boot/initrd-splash.img

    It responded OK but I don't know how to proceed.

    I tried to copy the SSD's MBR to UFD. Since the UFD has a smaller capacity, I used Puppy Linux to resize the SSD's swap partition to the same size as the UFD's first. Then I used the dd command to copy the MBR. Still I got the same grub prompt on booting.

    Thanks

    wywong

  7. #6
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    When using Clonezilla, you have options to copy partition to partition (this will not include the master boot record) or disk to disk (this includes the master boot record). Or you can do it as an image and copy the image to another drive. I haven't used this so I don't know if it includes the mbr.

    You can't remove the SSD? Is it set to first boot priority in your BIOS? Can you change this to boot the UFD first? If you can, you could try the suggestion from my last post for the grub.conf entry and if that fails, use root (hd0,0).

  8. #7
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7
    I can't use Clonezilla to copy disk to disk because my UFD is of smaller capacity. However I can buy a UFD with larger capacity or use my USB portable hard drive to try disk to disk copy, but only as a last resort.

    I can change the boot order on my AA1, and the UFD has been set as the first priority ever since I trying booting from the UFD. But setting the priority may not affect the order seen by Linux. I have Puppy Linux installed on another UFD. When AA1 is booted from the Puppy UFD, that UFD will appear as sdb, not sda, as the internal SSD is always sda. I guess it is because the SSD is of different hardware type. If I boot Puppy UFD with Linpus UFD attached to another USB port, the Puppy UFD will become sdc! Exchanging the USB ports of the two UFDs won't change that. If I boot Puppy with a USB portable drive attached, Puppy UFD will always appear as sdb! I don't know why and I don't know if all flavors of Linux behave the same. Maybe the device order is affected by the disk label.

    Actually I misunderstood part of your previous email. After modifying both grub.conf files, I always attempted booting directly from UFD, and I have tried having both UFD's grub.conf set root as (hd0,0) to try to chainload SSD but still got the grub prompt. Now I understand that you expected me to try booting from SSD and chainloading to UFD. I just tried and I got a black screen with a caret somewhere in the middle and the UFD LED was dark. When I pressed <Enter>, that caret disappeared but the black screen remained.

    I have Ubuntu installed on a USB portable drive. That distro has menu.lst. I added your 3 lines to the start of Ubuntu's grub.conf. I wanted to see if it would chainload to the SSD's Linpus. It didn't; it still booted to Ubuntu. I changed the 2nd line to "root (hd0,0)". Still booted to Ubuntu. So I guess the "chainloader +1" command may not work in some flavors of linux. When I checked the content of grub.conf, I found that it doesn't refer to drives as hdx. It has lines as follows:

    title Ubuntu...
    uuid 25fd9f...
    kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=25fd9f...
    ...

    I suspect the linpus grub.conf line

    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer

    may have problematic parameter: "root=LABEL=linpus", since both SSD and UFD have the same label. I changed the UFD label to linpus1 and changed the above line in grub.conf to "...root=LABEL=linpus1". Still booted to grub prompt. I have no clues. Is it possible to enable some debug option to see what is going on during boot? I seem to see a couple of text lines during boot, but before I have time to read them the screen is cleared and I can only see the grub> prompt.

    Thx for reading

    wywong

  9. #8
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Now I understand that you expected me to try booting from SSD and chainloading to UFD.
    So that means you put my suggested chainloader entry in the grub.conf of the SSD? This should work to boot the UFD from the SSD if the SSD is set to first boot priority?

    Grub does not necessarily see drives in the same order as you get from fdisk. What I would suggest is that you attach your UFD and the Ubuntu drive and with all three attached run the geometry commands from a Grub prompt. Boot the SSD (or Ubuntu), open a terminal and as root (sudo in Ubuntu) type grub, you should get a grub prompt like "grub>". If you do, type the following consecutively, hitting enter after each and checking or posting here the output:

    geometry (hd0)
    geometry (hd1)
    geometry (hd2)

    You could also try this with just the SSD and UFD attached to see what differences there are, if any.

  10. #9
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7
    When I add title...root (hd1,0)...chainload +1 to SSD's grub.conf, I get a black screen when booting from SSD.

    As for geometry output, I typed the displayed output below (so there may be typo). SSD is attached in all cases (I can't remove it). My Ubuntu drive is about 60G.

    Booted to SSD Linpus with Linpus UFD and Ubuntu drive:

    hd0: (apparently SSD)
    drive 0x80: C/H/S = 981/255/63, The number of sectors = 15761088, /dev/sda
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 1, Filesystem type unknown, partition type 0x82

    hd1: (apparently Linpus UFD)
    drive 0x81: C/H/S = 912/255/63, The number of sectors = 14661712, /dev/sdb
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 1, Filesystem type unknown, partition type 0x82

    hd2: (apparently Ubuntu)
    drive 0x82: C/H/S = 7113/255/63, The number of sectors = 114270345, /dev/sdc
    Partition num: 0, Filesystem type is ext2fs, partition type 0x83
    Partition num: 1, Filesystem type unknown, partition type 0x82
    Partition num: 2, ... (my Windows partitions)

    Booted to Ubuntu: the output is exactly the same!

    Booted from Linpus UFD (when I only got to grub> prompt):
    hd0: (apparent Linpus UFD)
    drive 0x80: C/H/S = 911/255/63, The number of sectors = 14661712, LBA
    Partition... (ditto)
    hd1: (apparently Ubuntu)
    drive 0x81: C/H/S = 1023/255/63, The number of sectors = 114270345, LBA
    Partition...
    hd2: (apparently SSD)
    drive 0x82: C/H/S = 980/255/63, The number of sectors = 15761088, LBA
    Partition...

    I notice that C (cylinder?) numbers differ from above, and there are no /dev/sdx at end of line.

    It seems that since UFD is seen as hd0, it should boot without any configuration file change. I typed the following to the grub> prompt:

    rootnoverify (hd1,0)
    kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=silent loglevel=1 console=tty1 quiet nolapic_timer
    initrd /boot/initrd-splash.img
    geometry (hd1)
    boot

    Just before "boot", the geometry output is the same as before I typed the lines(C/H/S = 980..., LBA). It successfully booted to Linpus on SSD (SSD LED lit and UFD LED dark during boot). However, when I tried running geometry again (terminal|su - root|grub|geometry (hdx)), the geometry output has changed - it is the same as having booted directly from SSD ((hd0: C/H/S = 981..., /dev/sda). Apparently, subsequent boot code builds the device map again. I suspect if I instruct grub to boot to UFD, which is currently hd0 and /dev/sda, at some stage the UFD is mapped to hd1 and /dev/sdb, which may break some of subsequent booting code. That may be a problem of that Linpus distro only.

    I tried the above again but this time I typed the following at the grub> prompt to attempt to boot to Linpus on UFD:

    rootnoverify (hd0,0)
    kernel /boot/bzImage ro root=LABEL=linpus1 ...
    ...
    boot

    Note that I had changed UFD's partition label to linpus1 as mentioned in previous post. This time I got the AA1 splash screen, but with the Caps Lock LED blinking and no SSD/UFD activity. The netbook hung. That seems to validate my suspicion. I then tried hd1 in lieu of hd0. Same result. I suspect some files corruptly copied during cloning or testing. I used Clonezilla to clone again. Same result. I then used GParted's partition copy/paste to copy the partition. Previously copying by that way resulted in gibberish or black screen during boot. This time, with MBR already valid, the result was different: booting from UFD ended up booting into SSD's Linpus (SSD LED lit but UFD LED dark). Same result as I typed "kernel...root=LABEL=linpus...boot" above. I changed SSD's partition label to linpus1 and then tried to boot from UFD. Again I got AA1 splash screen and blinking Caps Lock LED, same as I typed "kernel...root=LABEL=linpus1..boot" above.

    I don't understand why Clonezilla cloned parition boots to grub prompt but GParted cloned partition doesn't. My UBuntu portable drive were cloned from a Ubuntu UFD and it worked straight away.

    I have collected the geometry output for other configurations but I think it not of much use. I can post them if needed.

    Thanks

    wywong

  11. #10
    Just Joined!
    Join Date
    Sep 2009
    Posts
    7
    I figured out how to get debug messages - change the kernel parameters "vga=0x311 splash=silent" to "nosplash". I have SSD label set to linpus and UFD label set to linpus1. At grub> prompt, I attempted booting to UFD by typing

    root (hd0,0) (I tried root (hd1,0) also but always getting the same result)
    kernel /boot/bzImage ro root=LABEL=linpus1 nosplash...
    initrd /boot/initrd-splash.img
    boot

    The screen displayed:

    Uncompressing Linux... OK, booting the kernel.
    mkrootdev: label linpus1 not found
    mount: error 2 mounting ext2
    pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
    umount /initrd/proc failed: 2
    TuxOnIce: No attempt was made to resume...
    Kernel panic - ...

    and the Caps Lock LED kept blinking.

    I changed the "root=LABEL=linpus1" parameter to "root=/dev/sda1" and repeated the above. Linpus on SSD was successfully booted.

    I changed the parameter to "root=/dev/sdb1" and repeated the above, the screen displayed the same messages except that the "label linpus1 not found" line was not shown.

    Hope the above can provide some clues.

    Thanks

    wywong

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •