Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i'm trying to do this in both ubuntu 10.10 and debian lenny both of which use a different version of grub, the grub in ubuntu doesn't have the menu.lst file anymore and debian does i would like to know the process for both of them or atleast the differences between the two
i am planning on installing 7 and xp (just experimenting if there are differences between how these two function include that too)
(1) copy the MBR using dd if=/dev/sda of=saved.mbr bs=512 count=1
NOTE THAT /dev/sda might be different depending on the boot drive of your system!
(2) save that file saved.mbr somewhere you can get it, ie USB drive
(3) install Windows using the CD; this will obliterate grub but leave the rest unharmed. You have to have room on a free partition though!
(4) reinstall grub by either,
(a) booting from a SuperGrub CD (probably will only work with lenny using grub 0.97 as 10.10 uses grub 2)
(b) or better yet booting from the live CD of the appropriate distro, lenny or 10.10, and reinstalling grub form the grub> prompt
(c) as a last resort, restoring the mbr with dd if=saved.mbr of=/dev/sda bs=512 count=1
BE very careful with dd, don't make any typos, and you must be root or sudo.
NOTE THAT /dev/sda might be different depending on the boot drive of your system!
Last edited by mostlyharmless; 10-18-2010 at 05:20 PM.
Actually, the boot code is the first 446 bytes and the remaining is the partition table. The table will be modified when you install Windows and therefore you do not want to copy the old one back.
i'm using debian not ubuntu (even though they are similar i am not getting any luck using the debian interface and the debian setup disk i was able to use supergrub to boot into debian and thats it how do i restore grub after successfully accessing debian again and have it include windows, i don't have the grub menu on startup i just get a cli and it says GRUB> on the left like i'm suppossed to type something in there what do i do here
I don't use Ubuntu myself but I understand it uses ext4 filesystem?? Not sure. This site indicates Debian Lenny does not support ext4 which may be part of the problem if you are trying to boot Ubuntu from Debian.
If you are getting a command line only at boot, something went wrong with the bootloader install. It is usually easier to boot Grub Legacy systems from Grub2 but can be done both ways. You could check the link below for information on Grub2 and booting Grub Legacy from Grub2 and the reverse.
Since we don't know if you have installed your windows versions yet or any partition information, any advice you get would be nothing but a guess. Run the fdisk -l command as root from a Live CD or installation to post partition information.
From the grub> prompt you typically run something like
root (hd0) Then
setup (hd0,0)
where hd0 is your boot disk according to bios and hd0,0 refers to the first partition.
BUT I'd strongly consider reading the manual, as it's easy to go wrong.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.