[SOLVED] deleted option to boot windows from bootloader
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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 am using open suse 10.3.I have deleted 'booting windows option' from bootloader.Can you tell me how to add bootsector of windows partition.In windows 'bootpart program' allows you to add bootsector of another partition for booting is there a similiar tool in linux.
You dont need any third party tool to add windows to grub. Reinstalling grub will add it automatically.
from the terminal just give the command:
sudo grub-install /dev/sda/
Assuming grub is to be installed on sda. Check out the name for your drive.
Last edited by linuxlover.chaitanya; 12-19-2008 at 02:48 AM.
FOR ALL READERS
If you want to boot into windows.
I read this from magazine 'linux for you' simply do the following as root
#gedit /boot/grub/menu.lst
then add following to end of file
title windows xp
rootnoverify (hd0,0)
chainloader +1
NOTE
(hd0,0) represents /dev/sda1
(hd0,4) represents /dev/sda5
(hd1,0) represents /dev/sdb1
hd0=primary master hard disk
hd1=primary slave hard disk
hd=secondary master hard disk
If you find my post useful than thank me by pressing thumbs up button.Happy hacking.
Last edited by sumeet inani; 12-11-2009 at 06:26 AM.
Actually I deleted my ext3 partition which contained bootloader.It seemed now I won't be able to boot windows till I reinstall my ubuntu.
Then
I booted from live cd
Mounted ext3 partition as /ubuntu (let us say)
Then I ran command as root
Actually I deleted my ext3 partition which contained bootloader.It seemed now I won't be able to boot windows till I reinstall my ubuntu.
Then
I booted from live cd
Mounted ext3 partition as /ubuntu (let us say)
Then I ran command as root
Code:
grub-install --root-directory=/ubuntu --no-floppy
Now I created file /ubuntu/boot/grub/menu.lst containing (my windows is on /dev/sda1)
Code:
title xp
root (hd0,0)
makeactive
chainloader +1
Now i can boot windows till I don't install a linux OS whih will add its entry to bootloader.
Hope , it helps
One option any dual-boot user has to boot into windows if grub/lilo isn't functioning is Hiren's Boot CD, available as free download from: http://www.hirensbootcd.net/
Download and burn to CD. It will boot into moat versions of windows (including 7 & vista) as well as rescue boot into linux.
tommyttt , In my case grub was gone . How can hiren fix MBR to boot from the windows xp partition ? Can you explain ?
To leopard ,
i had deleted ext3 partition containing ubuntu & my grub bootloader. How can supergrub help in this case ? i saw http://rescatux.berlios.de/wiki/Main_Page . Rescatux wants the linux partition but i have deleted it so its unallocated space.
Last edited by sumeet inani; 08-05-2010 at 12:28 AM.
Thanks leopard.
I read the wiki & my windows is on /dev/sda1 so 'WIN' option will make windows as default boot option , appropriate for me.
Code:
I downloaded super_grub_disk_english_usb_0.9799.tar.gz .
Then extracted boot folder to pendrive.
Unmounted pendrive.
Now run
#sync;grub
grub>root (Press tab because we want to find out our pendrive
Possible disks are: hd0 hd1
grub>geometry (hd0)
drive 0x80: C/H/S = 38913/255/63, The number of sectors = 625142448, /dev/sda
Partition num: 0, Filesystem type unknown, partition type 0x27
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type unknown, partition type 0x82
Partition num: 5, Filesystem type is ext2fs, partition type 0x8
That was my hard disk because i have ubuntu on my 6th partition (part of extended 4th) while others are ntfs.
grub>geometry (hd1)
drive 0x81: C/H/S = 1187/120/55, The number of sectors = 7837696, /dev/sdb
Partition num: 0, Filesystem type is fat, partition type 0xb
This was my pendrive with single partition of fat32
grub>root (hd1,0)Set the current "root device" to pendrive
grub>makeactive setting boot flag of USB partition
grub>setup (hd1,0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/fat_stage1_5" exists... yes
Running "embed /boot/grub/fat_stage1_5 (hd1,0)"... failed (this is not fatal)
Running "embed /boot/grub/fat_stage1_5 (hd1,0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd1,0) /boot/grub/stage2 p /boot/grub/menu
.lst "... succeeded
Done.
grub>setup (hd1)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/fat_stage1_5" exists... yes
Running "embed /boot/grub/fat_stage1_5 (hd1)"... 22 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd1) (hd1)1+22 p (hd1,0)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.
Now boot
Quick way for those with internet
Select 'super grub disk' in distribution of unetbootin then it downloads a .img file & creates a working USB .
The other question that remains is
tommyttt , In my case grub was gone . How can hiren fix MBR to boot from the windows xp partition ? Can you explain ?
Last edited by sumeet inani; 08-06-2010 at 05:58 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.