On Sun, 2004-11-28 at 00:24 -0500, William Ballard wrote: > Whenever Lilo used to mess up with Woody, I'd: > > 1) Boot from the Woody CD. > 2) Mount my existing single Debian partition as / > 3) Execute a shell > 4) Make sure /vmlinuz and /vmlinuz-old pointed to the right > places in /boot. > 5) Exit the shell. > 6) Run "make system bootable." which would Lilo it up. > > Today I horked my Sarge Grub install, booted from the Sarge CD, > screwed up my paritions when I tried to do (2) (because creating, > formatting, and mounting partitions is all connected), verified > 4) was correct, couldn't figure out how to do 6), and running > "upgrade-grub" from within a chroot didn't work. > > When I entered "partition my disks," formatting my swap part was > already highlighed. I picked my big Debian ReiserFS part and told > it not to format it, but to mount it as /, and clicked Finish. > D-I told me it was going to make changes to my partition table, > even though I didn't tell it to change any partitions. Somehow > when it was done my swap part was gone. > > In Sarge D-I, how can I just mount something as / without changing > part tables or formatting anything, and run the "make system bootable" > step to recover from botched grub? > > Or how can I do it from within a chroot. I don't usually keep a second > install of Debian around to chroot from, so I'd have to chroot from > the Sarge emergency shell or (less desirably) a Knoppix CD. > > For now I just reinstalled the OS. It takes me 30 minutes with scripts. > But I looked like a tool having to do that.
Use grub-install. And given the root FS for the chroot, Where you have "/" and "/boot" properly mounted on "/targ" and "/targ/boot". Without a chroot. /targ/sbin/grub-install --root-directory=/targ /dev/hda Then edit a bare /targ/boot/grub/menu.lst. Reboot. Or do the same with a Knoppix/Gnoppix/liveCD with grub-install on it. -- greg, [EMAIL PROTECTED] The technology that is Stronger, better, faster: Linux
signature.asc
Description: This is a digitally signed message part