LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 10-18-2010, 04:59 PM   #1
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Rep: Reputation: 32
how do you install windows after installing linux


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)
 
Old 10-18-2010, 05:18 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
(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.
 
Old 10-18-2010, 05:46 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
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.

http://en.wikipedia.org/wiki/Master_boot_record

This might provide some insight on the differences between grub and grub2
https://help.ubuntu.com/community/Re...tallingWindows
 
Old 10-18-2010, 07:32 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
True, I was assuming that the partitioning wouldn't change, you are correct.
 
Old 10-18-2010, 08:19 PM   #5
baronobeefdip
Senior Member
 
Registered: Jul 2009
Distribution: Debian Squeeze
Posts: 1,267

Original Poster
Rep: Reputation: 32
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
 
Old 10-18-2010, 11:31 PM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,508

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
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.

http://wiki.debian.org/Ext4

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.

http://www.dedoimedo.com/computers/grub-2.html

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.
 
Old 10-19-2010, 10:35 AM   #7
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Re-installing Windows after Slack 12.2 Install Condemn Slackware 4 06-25-2009 01:38 PM
installing windows on dual boot system with fedora linux and windows xp vaishalicoep Linux - Newbie 2 04-23-2009 05:11 AM
how to install windows -xp o/s after installing Linux jagadeesh.nagireddy Linux - Enterprise 1 12-12-2007 09:35 AM
installing dual boot (linux and windows)without corrupting windows anirudh.iitm Linux - Newbie 7 06-30-2006 02:16 PM
install windows xp after installing suse 10.0 noorudin Linux - Software 1 05-06-2006 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration