Gentoo Archives: gentoo-user

From: Gregory Shearman <zekeyg@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] hard disk name changes within initramfs
Date: Mon, 10 Dec 2012 13:31:02
Message-Id: 20121210132929.GA11462@pacific.net.au
1 In linux.gentoo.user, you wrote:
2 > * Helmut Jarausch <jarausch@××××××××××××××××.de> [121206 09:27]:
3 >> Hi,
4 >>
5 >> on one of several machines I have a problem with initramfs.
6 >>
7 >> The machine has a single SATA drive. When the kernel boots it shows
8 >> that it is called /dev/sda,....
9 >> Now, within the init script of my initramfs it tries to mount /dev/sda2
10 >> as root but fails.
11 >> Since the initramfs spawns a shell (busybox) I can see the device files
12 >> for /dev/sda?
13 >> but fdisk /dev/sda fails.
14 >> As it turns out, the harddisk is now named /dev/sdb with /dev/sdb?
15 >> partition names.
16 > [..]
17 >
18 > I can't tell you why it changed but after my device names got messed
19 > around with (after an upgrade) and the next boot mounted /home on /tmp
20 > and an initscript blew away a bunch of home directories before I caught
21 > it I switched to mounting via UUID. Once you find the UUID to use it's
22 > easy and alleviates lots of problems in the future.
23 >
24 > Todd
25
26 All of the partitions of my HDD (including the root partition) are LVM
27 partitions so I don't have to worry about this problem at all.
28
29 --
30 Regards,
31 Gregory.