Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
messed up /dev/sdx list at boot [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Wed Feb 04, 2015 12:19 pm    Post subject: messed up /dev/sdx list at boot [solved] Reply with quote

I just did a fresh install and have trouble booting due to a messed up /dev/sdx list that appears to be different during install, grub and booting.

Used the minimal-install and then I got:
/dev/sda --> old OS disk that hes write trouble but still ned a few files from it (contains sda1, sda2 and sda3)
/dev/sdb --> data disk (contains sdb1)
/dev/sdc --> new install (sdc1, sdc2, sdc3, sdc4)
/dev/sdd --> raid array 0 on the controller (sdd1)
/dev/sde --> raid array 1 on the controller (sde1)

/dev/sdc is set up as gpt by the handbook:

/dev/sdc1 --> boot_bios
dev/sdc2 --> /boot (ext2)
/dev/sdc3 --> swap
/dev/sdc4 --> / (jfs)

I used GRUB, not grub2 and followed the syslinux wiki to get the mbr of the gpt disk ok. I set the disk as bootdisk in the bios and set the boot flag of /dev/sdc2. Ext2 and jfs compiled into the kernel.

After a few tries I found that for GRUB I have to use "root (hd0,1)" not (hd2,1) as I expected from the install. Likewise I then used " kernel gentoo-3.17.8-r1 root=/dev/sda4". Now the boot starts but ends with a kernel panic that seems related to changed disk labels:

Code:

VFS: Cannot open root device "sda4" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0800      4394530526 sda driver: sd
  0801       4394530526 sda1 8933b513-39f0-4cdf-b1a2-2c52ee613fea
0810      468749568 sdb driver: sd
  0811       468744538 sdb1 0034410-01
0b00      1048575 sr0 driver: sr


Now where are the other disks? And how can I find out what disk is what during this part of the boot? It is clear (I think) the neither the sda or sdb listed is the correct disk as they only have 1 partition.
_________________
Expert in non-working solutions


Last edited by Spanik on Wed Feb 04, 2015 7:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Feb 04, 2015 1:01 pm    Post subject: Reply with quote

Basically you have to name your partition by UUID when your boot loader supports such feature. Grub2 does afaik.
Some bootlaoders, for example grub 2 have also a build in "shell" like terminal where you can make some basic tests and see what is going on, and you can edit a boot temporarily and boot with that changed settings.
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Wed Feb 04, 2015 1:55 pm    Post subject: Reply with quote

I f I look at the disk idetifiers then I get:

/dev/sda --> 0x245feb89
/dev/sdb --> 0x68bfaf66
/dev/sdc --> 0CF87B53-FA15-4096-87A8-5FE80B8B2DE2 (this should be the /)
/dev/sdd --> 0x00034410
/dev/sde --> 9B947AA9-1ED1-4A66-8BB0-480FCAC7333B

The only number I recognise here is /dev/sdd which is one of the raid arrays.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Feb 04, 2015 1:59 pm    Post subject: Reply with quote

Code:
menuentry 'Linux Mint 12 LXDE, 3.0.0-12-generic (/dev/sda1) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
   recordfail
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='(hd0,msdos1)'
   search --no-floppy --fs-uuid --set=root 68e44433-b86e-4865-bb33-75c23b8d09ff
   echo   'Loading Linux 3.0.0-12-generic ...'
   linux   /vmlinuz-3.0.0-12-generic root=UUID=a0f74936-7c80-401d-9c33-98408f9603d0 ro recovery nomodeset
   echo   'Loading initial ramdisk ...'
   initrd   /initrd.img-3.0.0-12-generic
}


grub 2 example with UUID which was generated ages ago as obvious from the Linux Mint 12 LXDE cd.

you may just need something like this with your values and it may work
Code:
linux   /vmlinuz-3.0.0-12-generic root=UUID=a0f74936-7c80-401d-9c33-98408f9603d0 ro recovery nomodeset
as it seems that this is the kernel line. So just specify the root volume and you may have it done.

have you build in the related kernel modules?
Y => hardware hdd controler which you have
Y => File systems in use

http://wiki.gentoo.org/wiki/Handbook:AMD64/Blocks/Disks
Quote:
Default: Using parted to partition the disk


I have seen where you may have gotten your partition table layout and I do not want to question the author of those pages.
Off topic: I personally recommend grub2 when you do not have a particular demand for grub. And your issue may be solved instnatly when you use grub2. As you asked for grub regarding your gpt disk.

this page here http://www.wensley.org.uk/gpt
Quote:
Normally, Grub does not understand GPT partition tables and needs to be tricked into starting from one.


Well sorry for beeing not a big help but I believe grub2 solves your issues.

And I also do not get the point why you do not use gdisk and other tools. I have done a quick research and there is gdisk and other tools for gpt partition and such.. Well sorry for beeing of topic. I am sure the writers of the handbook know more and therefore they have a reason why it is as it is.


Last edited by Roman_Gruber on Wed Feb 04, 2015 2:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Wed Feb 04, 2015 2:12 pm    Post subject: Reply with quote

Same result:

VFS: Cannot open root device "UUID=ocf87..." or unknown-block(0,0): error -6

Could it be that for one reason or another in the kernel config the right drivers for the onboard sata isn't working or not present? But how can the kernel then start?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Feb 04, 2015 2:28 pm    Post subject: Reply with quote

Spanik wrote:
Same result:

VFS: Cannot open root device "UUID=ocf87..." or unknown-block(0,0): error -6

Could it be that for one reason or another in the kernel config the right drivers for the onboard sata isn't working or not present? But how can the kernel then start?



yes the kernel does not understand your root device.

could be afaik a kernel issue.

wrong fs
not supported fs in the kernel, therefore build anythign in with a Y, never use m
no software support build in for your hardware controller, lspci => determine waht you have => check a livecd what modules are loadedin the livecd and build them in the kernel.

or grub1 does not like your fs you have choosen, but i may be such wrong with that statement.

anyway i have edited my post above you may please read the last lines of my other posts.

bios => mbr => grub 1 => grub 1 takes the kernel from the spot you have specified => assumes kernel was placed in the /boot directory which is a separate parition which is readable

so lets assuem the kernel is in dev/sdc2 --> /boot (ext2)

than the problem resides in that your kernel is unable to read your filesystem of / or does not find your / because the kernel has no support for your hardware hdd controler.

you may boot up a livecd and check what modules are loaded and build them in your kernel with Y
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Wed Feb 04, 2015 2:59 pm    Post subject: Reply with quote

Ok, baby steps... I checked the kernel config and I hadn't included "platform sata". Now I still have the kernel panic but at least all disks are listed in the "available partitions". So probably it is now listed as /dev/sde4.

I'm not a fan of grub2. Tried it once and had nothing but trouble. Never got it to change a kernel, it didn't want to react to the keyboard. TRying to use the scripts to change the default did nothing. Kernels were added at random. I don't trust configfiles where I'm not allowed to change anything in an editor.

Rebooted while typing this and it now boots but with a lot of errors, everything added to runlevel default caught sigterm...

Each install is harder and harder... I remember the ease it went with a stage 1.

EDIT: had to change fstab accordingly
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Feb 04, 2015 7:36 pm    Post subject: Reply with quote

Quote:
Kernels were added at random.


well i usually write the full grub entry by hand. than i put the coresponding file by hand in the desired place.
afaik the usual behaviour since lilo / grub.
I do not expect that those fancy automatics work as desired or name kernels as desired.

i use grub2 much longer as it was here suggested to use because my binary distros used it much earlier. gentoo was still stuck at grub 1 as i used grub2. not much hassle for myself. i just used the binary grub2 and adjusted it to my needs.

Well when your issue is solved please add [solved[ to the title, thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum