help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unstable boot for Ubuntu Karmic i386 installed in external USB hard


From: Lawrence Tsang
Subject: Re: Unstable boot for Ubuntu Karmic i386 installed in external USB harddisk
Date: Fri, 19 Feb 2010 13:49:43 +0800

Hi Paul and All,

     The boot option "root=UUID=<yourUUID>" works. I could now stably boot Ubuntu from the external disks. Thanks.

     However, some minor in-stabilities still exist. In fact, besides the one external USB harddisk and my two internal harddisks, I find that my system has four other "scsi emulated" disks due to the presence of a memory card reader drive. So, at bootup, the Karmic kernel sometimes recognizes the external USB Ubuntu partition as /dev/sdc2 and sometimes as /dev/sdg2. (My two internal harddisks are recognized as /dev/sda and /dev/sdb)

     If my Ubuntu partition is recognized as /dev/sdg2 at bootup, then everything seems work OK. If my Ubuntu is recognized as /dev/sdc2, then my system works OK in my normal operations but I find errors when I try to update "grub.cfg" using "update-grub". The "update-grub" script says that it has some difficulties dealing with /dev/sdg2 but, in fact, my Ubuntu partition is treated as /dev/sdc2. (In this situation I think /dev/sdg should be one of my memory card reader)

     I think the "update-grub" errors come from the script "/etc/grub.d/10_linux" which may have some codes trying to access /dev/sdg2.

     If my Ubuntu Karmic partition is recognized as /dev/sdg2, then "update-grub" runs smoothly and would generate the following menuentry for the 2.6.31-19 kernel :

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd2,2)
        search --no-floppy --fs-uuid --set 5a715fd8-c9d0-4523-a213-eff956d2d798
        linux   /boot/vmlinuz-2.6.31-19-generic root=UUID=5a715fd8-c9d0-4523-a213-eff956d2d798 ro   quiet splash
        initrd  /boot/initrd.img-2.6.31-19-generic
}

     Otherwise if the Ubuntu partition is recognzied as /dev/sdc2, then "update-grub" runs with some errors and would generate a corresponding menuentry as listed in my first email.

     I want to know that, is there any boot option that could force my Ubuntu Karmic partition to be recognized as /dev/sdg2 at bootup? Or is there anything that I could do to make the "update-grub" script run correctly ?

     Thanks for your attention. Any suggestion ?

Regards
Lawrence


On Fri, Feb 19, 2010 at 2:28 AM, Paul Geraedts <address@hidden> wrote:
Hi Lawrence,

The problem is the mapping of your USB disk, which seems to change.
You can solve that problem simply by using something like UUID
identification of your partitions. See for details for instance here:
http://www.unixtutorial.org/2008/05/ubuntu-uuid-how-to/

Basically you add 'root=UUID=<yourUUID>' as kernel option. 'sudo
blkid' shows <yourUUID>.

Best regards,

Paul


2010/2/18 Lawrence Tsang <address@hidden>:
> Hi All,
>
>      I am a newbie in Grub 2 using the Ubuntu Karmic i386 system installed
> in an external harddisk. My computer has two internal harddisks and one
> external USB harddisk. The USB disk contains two partitions, the 1st one is
> for data and the 2nd one is installed with Ubuntu Karmic i386.
>
>      At system bootup, when I force the BIOS to boot from the external disk,
> the Grub 2 menu appears and I choose the 1st entry to boot my Ubuntu Karmic.
> The Karmic system sometimes boots normally into a fully functional system
> with no apparent error. However, at certain times, the Karmic boots into a
> "initramfs" prompt with the following messages :
>
> Gave up waiting for root device
> .....
> .....
> ALERT ! /dev/sdc2 does not exist. Dropping to a shell !
> .....
> (initramfs)
>
>      After examining the "grub.cfg" file, I find the corresponding bootup
> menuentry to be :
>
> ### BEGIN /etc/grub.d/10_linux ###
> menuentry "Ubuntu, Linux 2.6.31-19-generic" {
>         recordfail=1
>         if [ -n ${have_grubenv} ]; then save_env recordfail; fi
>         set quiet=1
>         linux   /boot/vmlinuz-2.6.31-19-generic root=/dev/sdc2 ro   quiet
> splash
>         initrd  /boot/initrd.img-2.6.31-19-generic
> }
>
>      In the "linux" line of the menuentry, it has been set that
> "root=/dev/sdc2". I think this may be the cause of the unstable boot
> problem.
>
>      In the "initramfs" prompt, I don't see any /dev/sdc2 (using "ls
> /dev/sd*"). I could only see /dev/sdg1 and /dev/sdg2. Perhaps the linux
> kernel sometimes recognizes my Ubuntu Karmic partition as /dev/sdc2 and
> sometimes as /dev/sdg2.
>
>      How could I set the Grub 2 menuentry for a stable boot? Any idea?
>
>      Thanks for any suggestion.
>
> Regards
> Lawrence
>
>
> _______________________________________________
> Help-grub mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-grub
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]