Gentoo Archives: gentoo-user

From: kwkhui@××××.net
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 11:14:14
Message-Id: 20120414191157.256526b9@gentoo-main.kwkh-home
In Reply to: Re: [gentoo-user] About ready to move /usr, /var and /home to LVM. by Dale
1 On Sat, 14 Apr 2012 05:32:01 -0500
2 Dale <rdalek1967@×××××.com> wrote:
3
4 > Gregory Shearman wrote:
5 > > In linux.gentoo.user, Dale wrote:
6 > >> I have ran into a issue here. I copied everything over to sdb, my
7 > >> temp drive. When I try to boot it, it still boots from sda which
8 > >> is the primary drive. I can not get it to boot from the copy. I
9 > >> did update the fstab file to point to the new sdb partitions, I
10 > >> use labels for that and they have different names. I also edited
11 > >> grub and told it root was sdb2. When I boot, everything mounted
12 > >> is sda.
13 > >
14 > > Did you actually install grub onto your MBR by either:
15 > >
16 > > # grub-install --no-floppy /dev/sdb
17 > >
18 > > or
19 > >
20 > > # grub
21 > >
22 > > grub> root (hd1,0)
23 > > grub> setup (hd1)
24 > > grub> quit
25 > >
26 > > -------------------------------------------------------------------------
27 > >
28 > > You didn't actually write down these steps. Are you assuming that we
29 > > know you've done that?
30 > >
31 >
32 >
33 > In the past, I never had to install grub to sdb. As long as grub is
34 > installed to one drive, I can boot a OS from any drive. I did this
35 > when I used to have Mandrake and Gentoo installed. I had Mandrake
36 > installed on sda and Gentoo on sdb. I only had one /boot partition
37 > which was on sda1. It had the kernel for both Mandrake and Gentoo in
38 > it and sda1 was used for both.
39 >
40 > So, has something changed that if I want to boot from a second drive I
41 > have to install grub to its MBR first? When the BIOS finishes and
42 > loads grub, doesn't it always load from the first drive? If that is
43 > true, doesn't it ignore the MBR on the second drive? It can't load
44 > both MBRs right?
45
46 Yes, if you want to boot from another drive, that drive needs to have
47 a usable MBR (or GPT equivalent).
48
49 The BIOS (or UEFI) dictates which MBR to load first, and GRUB doesn't
50 come into it until BIOS found it and loaded it. This is usually done
51 in the "boot sequence" config option in BIOS, although it can be
52 temporarily overridden at boot time by pressing a suitable key.
53
54 > This isn't making sense. I have done this many times in the past with
55 > no problems but now something is different. I need help figuring out
56 > what.
57
58 There are many ways this can go wrong. Most probably BIOS boot loading
59 sequence has changed (e.g. if you plug in a USB stick and save boot
60 sequence where the USB stick is tried first, then what happened when
61 you remove the stick and reboot is anybody's guess, because the BIOS
62 will try to outsmart you in guessing what that invalid first boot
63 device should have been). Or maybe you had /dev/sdb disk as the first
64 boot disk all along, the previous absence of a bootloader means BIOS
65 tried the next one silently...
66
67 My own safety net is to have /dev/sda1 and /dev/sdb1 pretty much the
68 same, except the grub.conf has a difference of a useless title line to
69 indicate which disk it was.
70
71 > Dale
72 >
73 > :-) :-)
74 >
75
76 Kerwin.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] About ready to move /usr, /var and /home to LVM. Dale <rdalek1967@×××××.com>