2016-09-07 1:03 GMT+03:00 gevisz <gev...@gmail.com>:
> 2016-09-07 0:32 GMT+03:00 Neil Bothwick <n...@digimed.co.uk>:
>> On Wed, 7 Sep 2016 00:05:32 +0300, gevisz wrote:
>>
>>> >> But it seems that GRUB does not read fstab... :(
>>> >
>>> > It does not, because it has not loaded the kernel yet, so it cannot do
>>> > anything on the system.
>>>
>>> Oh, poor little Grand Unified Boot Loader!
>>>
>>> It cannot do anything! Even to read fstab by its grub-mkconfig script!
>>
>> We were talking about GRUB the bootloader, not grub-mkconfig the Linux
>> program to write grub.cfg. As you were asking whether you should run
>> grub-mkconfig again, it seems reasonable to assume that you haven't run
>> it since adding the disk, not that it should make a difference.
>>
>>> P.S. I usually run grub-mkconfig when kernel is already loaded!
>>>       And in my fstab all the disks are refered by UUID!
>>>
>>
>> grub-mkconfig doesn't care about the fstab of the running distro since it
>> scans your drives for all operating systems it can boot.
>>
>> Either look in grub.cfg to see what it going on or post it here along
>> with the exact error messages so others may try for you.
>>
>
> I have added the following line to the /etc/default/grub
>
> GRUB_CMDLINE_LINUX="root=UUID=44***"
>
> run
>
> # grub-mkconfig -o /boot/grub/grub.cfg
>
> and got in /boot/grub/grub.cfg the following entry
>
> ### BEGIN /etc/grub.d/10_linux ###
> menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class
> gnu --class os $menuentry_id_option 'gnulinux-simple-44***' {
>     load_video
>     insmod gzio
>     insmod part_msdos
>     insmod ext2
>     set root='hd1,msdos3'
>     if [ x$feature_platform_search_hint = xy ]; then
>       search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos3
> --hint-efi=hd1,msdos3 --hint-baremetal=ahci1,msdos3
> --hint='hd1,msdos3'  44***
>     else
>       search --no-floppy --fs-uuid --set=root 44***
>     fi
>     echo    'Loading Linux 4.4.6-gentoo ...'
>     linux    /boot/vmlinuz-4.4.6-gentoo root=/dev/sdb3 ro
> }

Well, actually after adding

GRUB_CMDLINE_LINUX="root=UUID=44***"

line to the /etc/default/grub and running

# grub-mkconfig -o /boot/grub/grub.cfg

the last line in the /boot/grub/grub.cfg became

    linux    /boot/vmlinuz-4.4.6-gentoo-ntfs root=/dev/sdb3 ro root=UUID=44***

> The 44*** denotes the UUID of my boot partition.

after that the system stopped booting at all, complaining after the GRUB menu:
VFS: cannot open root device "UUID=44***" or ...
with and without the new drive attached. :(

After many attempts, I finally managed to boot with the new drive attached
manually editing the above entry in /boot/grub/grub.cfg
1) deleting the root=UUID=44*** part of its line (which probably means that
    adding GRUB_CMDLINE_LINUX="root=UUID=44***" line to the /etc/default/grub
    was a bad idea :),
 2) changing in the same last line sdb3 to sdc3, and
 3) changing hd1 and ahci1 throughout the entry to hd3 and ahci3
     (currently I am not sure about the last number but will find it
out in the next boots)
     wich is strange as BIOS reports that the boot disk sits on the
0th IDE chanel and
     the other two (SATA) drives - on the 1st and 2nd IDE chanels.

Reply via email to