On earlier versions of Centos, I could boot the install CD in rescue mode, let it find and mount the installed system on the HD even when it was just one disk of RAID1 partitions (type=FD). When booting from the centos5 disk the attempt find the system gives a box that says 'You don't have any Linux partitions'. At the bottom of the screen there is something that says: cl->raidtype=5 rd_type=1 <TAB><Alt-Tab> between elements cl->raidtype=5 rd_type=1 <F12> next screen But there is no way to access the bottom part. If I hit the OK button and get a shell I can mount the partitions myself, but then when I chroot to the mounted system there are no devices in /dev. What's the right way to install grub on what was /dev/sdb in the original install but is now the only disk and moved to /dev/sda? The old /dev/sda is no longer there.... -- Les Mikesell lesmikesell at gmail.com
The right way is to boot directly into grub and ask it to find the stage1 file on the partitions. Then set your root partition Then setup grub on the mbr of each drive. There are many pages google can find with explicit details. Mike Les Mikesell wrote:> On earlier versions of Centos, I could boot the install CD in rescue > mode, let it find and mount the installed system on the HD even when it > was just one disk of RAID1 partitions (type=FD). When booting from the > centos5 disk the attempt find the system gives a box that says 'You > don't have any Linux partitions'. At the bottom of the screen there is > something that says: > cl->raidtype=5 rd_type=1 > <TAB><Alt-Tab> between elements cl->raidtype=5 rd_type=1 <F12> next screen > But there is no way to access the bottom part. If I hit the OK button > and get a shell I can mount the partitions myself, but then when I > chroot to the mounted system there are no devices in /dev. What's the > right way to install grub on what was /dev/sdb in the original install > but is now the only disk and moved to /dev/sda? The old /dev/sda is no > longer there.... >
Les Mikesell <lesmikesell at gmail.com> wrote:> Grub isn't so much the issue here as the difference in the rescue mode > boot. I'm used to being able to boot the CD, chroot into the existing > system and have pretty much normal access regardless of what was broken. > Now that the system /dev directory is basically empty, things don't work > when you have to mount the partitions manually. Is there a step to > set up devices so the chroot will work?Hey Les - I haven't tried this but were you looking at /dev *after* you did the chroot? It sort of makes sense to me that the running kernel would only populate it's /dev, not the chrooted /dev. Rescue mounts at least the root partition under /mnt/sys (or something like that). Before you chroot, you should probably also mount any other partitions you want under /mnt/sys and then chroot. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce
On Tue, 2007-05-15 at 17:12 -0500, Les Mikesell wrote:> On earlier versions of Centos, I could boot the install CD in rescue > mode, let it find and mount the installed system on the HD even when it > was just one disk of RAID1 partitions (type=FD). When booting from the > centos5 disk the attempt find the system gives a box that says 'You > don't have any Linux partitions'. At the bottom of the screen there is > something that says: > cl->raidtype=5 rd_type=1 > <TAB><Alt-Tab> between elements cl->raidtype=5 rd_type=1 <F12> next screen > But there is no way to access the bottom part. If I hit the OK button > and get a shell I can mount the partitions myself, but then when I > chroot to the mounted system there are no devices in /dev. What's the > right way to install grub on what was /dev/sdb in the original install > but is now the only disk and moved to /dev/sda? The old /dev/sda is no > longer there....Arrfab has a good way to do it on his blog: http://www.arrfab.net/blog/?p=11 M$-Internet Exploder est le cancer de l'Internet, voyez pourquoi ici : --> http://www.decroissance.info/Ateliers-Liberez-votre-ordinateur <-- Et plus vous ?viterez les produits Micro$oft, plus libres vous serez : -------------> http://libre-fan.apinc.org/article21.html <------------ -- (?- Bernard Lheureux Gestionnaire des MailingLists ML, TechML, LinuxML //\ http://www.bbsoft4.org/Mailinglists.htm ** MailTo:root at bbsoft4.org v_/_ http://www.bbsoft4.org/ <<<<<< * >>>>>> http://www.portalinux.org/
On 5/15/07, Les Mikesell <lesmikesell at gmail.com> wrote:> On earlier versions of Centos, I could boot the install CD in rescue > mode, let it find and mount the installed system on the HD even when it > was just one disk of RAID1 partitions (type=FD). When booting from the > centos5 disk the attempt find the system gives a box that says 'You > don't have any Linux partitions'. At the bottom of the screen there is > something that says:Hi Les, Are you trying to install grub on the second disk of a software raid 1 array because anaconda STILL does not properly setup grub on both disks during install? -- Robert Arkiletian Eric Hamber Secondary, Vancouver, Canada Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/ C++ GUI tutorial http://www3.telus.net/public/robark/
Les Mikesell <lesmikesell at gmail.com> wrote:> David G. Miller wrote: >> > >> >>> >> Grub isn't so much the issue here as the difference in the rescue mode >>> >> boot. I'm used to being able to boot the CD, chroot into the existing >>> >> system and have pretty much normal access regardless of what was >>> >> broken. Now that the system /dev directory is basically empty, things >>> >> don't work when you have to mount the partitions manually. Is there >>> >> a step to set up devices so the chroot will work? >>> >> > >> > I haven't tried this but were you looking at /dev *after* you did the >> > chroot? It sort of makes sense to me that the running kernel would only >> > populate it's /dev, not the chrooted /dev. Rescue mounts at least the >> > root partition under /mnt/sys (or something like that). Before you >> > chroot, you should probably also mount any other partitions you want >> > under /mnt/sys and then chroot. >> > > It makes sense for the boot code, but not for me afterwards... The real > problem is that the rescue mode startup doesn't mount RAID1 partitions > at all (this seems like a bug). The startup code might populate the > chroot'ed /dev if it had done the mount - I just haven't found how to do > it myself after doing the mount by hand. Thus there's no /dev/sda or > /dev/sdb as you'd expect when you want to install grub.Let me try explaining this a different way. After you let the rescue software mount the partition, *don't* chroot. It's been a long time since I had to mess with booting in rescue mode but lets assume your old root partition gets mounted under /mnt/sysimage and you told the rescue software to go ahead and mount it. If your /boot is a separate partition, you'll need to mount it manually. Assuming you keep everything where it belongs, mount it under /mnt/sysimage/boot. Then run grub by doing: /mnt/sysimage/sbin/grub --config-file=/mnt/sysimage/boot/grub/grub.conf This way grub "sees" /dev for the running system but uses your real grub config file. You may want to confirm that grub.conf has what you want in it. Cheers, Dave -- Politics, n. Strife of interests masquerading as a contest of principles. -- Ambrose Bierce