Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] booting - I don't anystand how the (Linux) world works anymore
Date: Sat, 25 Jun 2016 19:52:13
Message-Id: 08789349-f812-e211-61b5-4159f8f13aae@gmail.com
In Reply to: [gentoo-user] booting - I don't anystand how the (Linux) world works anymore by Helmut Jarausch
1 On 25/06/2016 20:33, Helmut Jarausch wrote:
2 > Hi,
3 >
4 > I'm a dino since I still use grub-1 but I prefer recent kernels
5 > (currently 4.70-rc4)
6 >
7 > I don't understand the 'root=' option on the boot line like
8 > kernel /boot/vmlinuz-4.7.0-rc4 root=/dev/sda1
9 >
10 > Here my bad experience:
11 >
12 > Having booted by SystemRescueCD from the cdrom device, my root device is
13 > labelled /dev/sda1
14 > BUT trying to use that on the kernel boot line fails (the kernel cannot
15 > find the root file system)
16 >
17 > By trial and error I've found that I have to use root=/dev/sdb1
18 >
19 > but if I plug in an external drive (via USB) this doesn't work any more.
20 >
21 > So, I came up with root=UUID=uuid_number of the root file system.
22 >
23 > But to my surprise I now got a kernel panic
24 > syncing: VFS: unable to mount root fs on unknown block(0,0)
25 >
26 > So, please tell me what I'm missing?
27 >
28 > Many thanks!!!
29 > Helmut
30 >
31 >
32
33
34 I've run into this with my last 3 laptops. grub, systemrescue and most
35 other things that run before my kernel is booted usually find the SSD as
36 the first drive (what a running kernel would call sda), and the spinning
37 rust is sdb.
38
39
40 When the kernel eventually boots and does device discovery, it decides
41 the spinning rust is the primary drive (sdb) - the opposite way around.
42
43 So why does this happen? screwed if I know, BUT, the the kernel has
44 never guaranteed it will always find and enumerate devices the same way
45 every time always. This might account for why SystemRescueCD and your
46 installed system do opposite things[1]. We don't know *why* it's sdb,
47 but we know at grub time that it is. SO use whatever that software
48 thinks the thing is called :-)
49
50
51
52 [1] It's also one of the reasons persistent device naming came into
53 udev, to try guarantee the same device will always have the same name
54
55
56 --
57 Alan McKinnon
58 alan.mckinnon@×××××.com

Replies