Got a nice little netbook, Samsung N150, alas with W7 taking all four primary partitions, removed the fourth without a hitch, made an extended one, and put UNR 10.04 into it after shrinking the 3rd.
Ask me if you need details.
After reboot, I get the Ubuntu menu entries in grub, as well as two W7 (Vista, héhé!) loaders. After some days, I made a mistake, and instead of the one with the real W7, I started the one with the W7 recovery. No way to stop it at loading, so I waited for the welcome screen, where I clicked "no, I don't want to recover W7". Nevermind. Windows is Windows and overwrote the MBR. So at reboot, just a blinking cursor.
Question: How to write the MBR back? Without reinstalling?
https://help.ubuntu.com/community/Re...tallingWindows
isn't a bad start, but my partitioning is more complex:
sda5 is boot
sda6 is swap
sda7 is root
sda8 is home
I am not sure I can do what is written there, since the mount will not mount boot and root. And if I mount both, oh well, maybe it works? I am not confident.
So what I did, I booted to the UNR thumb drive (Live-CD), and opened a console.
$ cd /mnt
sudo mkdir oldroot
sudo mkdir oldboot
sudo mount /dev/sda7 oldroot
sudo mount /dev/sda5 oldboot
(ls -l oldroot and ls -l oldboot showed I mounted the right partitions)
sudo -o bind oldboot oldroot/boot
(ls -l oldroot/boot showed the correct vmlinuz, initrd, etc.)
sudo chroot oldroot
I might need these:
# mount proc
# mount dev
# grub-install /dev/sda
(no error shown)
# exit
$ exit
Shutdown and rebooted, and everything was working again.
I really, really, don't know why the UNR Live-CD doesn't contain a recovery for grub. I wonder, if it was written cleverly enough, to just put back the MBR if I selected the correct partitions during an install, without formatting them? I don't think so.
Maybe I should file this as a RFE, that after partitioning, the user has a choice to just write back the MBR?
Thanks for a really great Lucid Lynx for netbooks (if you never tried, you wouldn't notice how much faster Ubuntu boots and reacts, compared to the included W7 home edition!)
Uwe
Bookmarks