Re[2]: [gentoo-user] About ready to move /usr, /var and /home to LVM.

2012-04-14 Thread Stefan Schmiedl
Dale,

Saturday, April 14, 2012, 5:46:44 AM, you wrote:

D Stefan Schmiedl wrote:
 I'd expect to see root (hd1,0) in there somewhere.

D I tried changing the root line and it still booted sda.  Also, note that
D I also tried a grub entry that doesn't even have a root line.  It just
D points directly to sdb.

DFrom what I have always been told, the root line points to grub not the
D root partition of the OS.  Those are two different things.  Correct me
D if I am wrong here.  That's the way I have always been told.

That is correct, root (hdx,y) points to partition y on drive x, where
the kernel is to be found, i.e. the root path for the kernel line.
The kernel uses its root=/dev/whatever to set up the root for the linux
environment.

D I'm using grub legacy here.

me too. And the last time I tried, changing the root line made grub boot
from the other disk. Have you tried editing this line in grub's editor
during boot? 

s.




Re[2]: [gentoo-user] About ready to move /usr, /var and /home to LVM.

2012-04-13 Thread Stefan Schmiedl
Dale,

Friday, April 13, 2012, 10:35:43 PM, you wrote:

 I have ran into a issue here.  I copied everything over to sdb, my temp
 drive.  When I try to boot it, it still boots from sda which is the
 primary drive.  I can not get it to boot from the copy.  I did update
 the fstab file to point to the new sdb partitions, I use labels for that
 and they have different names.  I also edited grub and told it root was
 sdb2.  When I boot, everything mounted is sda.
 
 Those are from the copy.  Here is grub:
 
 title=Initramfs-new_drive
 root (hd0,0)
 kernel /bzImage-3.3.1-1 root=/dev/sdb2 init=/sbin/init nox
 initrd /initramfs-3.3.1-1-tmp.img

if you want to boot from /dev/sdb, why do you tell grub
to use (hd0,0), which usually maps to /dev/sda1?

I'd expect to see root (hd1,0) in there somewhere.

Depending on boot flags and BIOS settings, you might still
be using the MBR on /dev/sda.

When I migrated a client's data over to a new disk a while
ago, I basically used tar cf - /sda | tar xf - -C /sdb and
then switched SATA cables before rebooting. The former /dev/sdb
became /dev/sda and everything was fine.

s.

 
 I have done this in the past and it worked but not now.  Is this the
 init thingy mounting sda stuff and then Gentoo carries on from there?
 If so, how do I tell the init thingy to point to sdb stuff?
 
 Thoughts?
 
 Dale
 
 :-)  :-)
 


D OK.  I thought of something else to try.  I created a new grub entry.
D This is a plain entry with no init thingy at all.  It looks like this:

D title Gentoo no init tmp drive
D kernel (hd0,0)/bzImage-3.3.1-1 root=/dev/sdb2 nox

D Simple but it still boots the sda drive instead of the sdb drive.  What
D am I missing here?  I looked in dmesg, the root=/dev/sdb2 line is in
D there so grub passes it on.

D This is weird.  I need ideas folks.  I'm running out of things to try.

D Dale

D :-)  :-)




-- 
Stefan Schmiedl
EDV-Beratung Schmiedl, Berghangstr. 5, D-93413 Cham
im Büro: 09971 9966 989, am Handy: 0160 9981 6278

This is why Science and Mathematics are still much fun:
You discover things that seem impossible to be true
and then get to figure out why it's impossible for them not to be.

-- Vi Hart: Spirals, Fibonacci, and Being a Plant, Part 3