Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] About ready to move /usr, /var and /home to LVM.
Date: Sat, 14 Apr 2012 03:48:44
Message-Id: 4F88F324.20706@gmail.com
In Reply to: Re[2]: [gentoo-user] About ready to move /usr, /var and /home to LVM. by Stefan Schmiedl
1 Stefan Schmiedl wrote:
2 > Dale,
3 >
4 > Friday, April 13, 2012, 10:35:43 PM, you wrote:
5 >
6 >>> I have ran into a issue here. I copied everything over to sdb, my temp
7 >>> drive. When I try to boot it, it still boots from sda which is the
8 >>> primary drive. I can not get it to boot from the copy. I did update
9 >>> the fstab file to point to the new sdb partitions, I use labels for that
10 >>> and they have different names. I also edited grub and told it root was
11 >>> sdb2. When I boot, everything mounted is sda.
12 >>>
13 >>> Those are from the copy. Here is grub:
14 >>>
15 >>> title=Initramfs-new_drive
16 >>> root (hd0,0)
17 >>> kernel /bzImage-3.3.1-1 root=/dev/sdb2 init=/sbin/init nox
18 >>> initrd /initramfs-3.3.1-1-tmp.img
19 >
20 > if you want to boot from /dev/sdb, why do you tell grub
21 > to use (hd0,0), which usually maps to /dev/sda1?
22 >
23 > I'd expect to see root (hd1,0) in there somewhere.
24 >
25 > Depending on boot flags and BIOS settings, you might still
26 > be using the MBR on /dev/sda.
27 >
28 > When I migrated a client's data over to a new disk a while
29 > ago, I basically used "tar cf - /sda | tar xf - -C /sdb" and
30 > then switched SATA cables before rebooting. The former /dev/sdb
31 > became /dev/sda and everything was fine.
32 >
33 > s.
34 >
35 >>>
36 >>> I have done this in the past and it worked but not now. Is this the
37 >>> init thingy mounting sda stuff and then Gentoo carries on from there?
38 >>> If so, how do I tell the init thingy to point to sdb stuff?
39 >>>
40 >>> Thoughts?
41 >>>
42 >>> Dale
43 >>>
44 >>> :-) :-)
45 >>>
46 >
47 >
48 > D> OK. I thought of something else to try. I created a new grub entry.
49 > D> This is a plain entry with no init thingy at all. It looks like this:
50 >
51 > D> title Gentoo no init tmp drive
52 > D> kernel (hd0,0)/bzImage-3.3.1-1 root=/dev/sdb2 nox
53 >
54 > D> Simple but it still boots the sda drive instead of the sdb drive. What
55 > D> am I missing here? I looked in dmesg, the root=/dev/sdb2 line is in
56 > D> there so grub passes it on.
57 >
58 > D> This is weird. I need ideas folks. I'm running out of things to try.
59 >
60 > D> Dale
61 >
62 > D> :-) :-)
63
64
65 I tried changing the root line and it still booted sda. Also, note that
66 I also tried a grub entry that doesn't even have a root line. It just
67 points directly to sdb.
68
69 From what I have always been told, the root line points to grub not the
70 root partition of the OS. Those are two different things. Correct me
71 if I am wrong here. That's the way I have always been told.
72
73 I'm using grub legacy here.
74
75 Dale
76
77 :-) :-)
78
79
80 --
81 I am only responsible for what I said ... Not for what you understood or
82 how you interpreted my words!
83
84 Miss the compile output? Hint:
85 EMERGE_DEFAULT_OPTS="--quiet-build=n"

Replies

Subject Author
Re[2]: [gentoo-user] About ready to move /usr, /var and /home to LVM. Stefan Schmiedl <s@×××.de>