LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-30-2006, 06:58 PM   #1
Minn3h
LQ Newbie
 
Registered: Sep 2003
Distribution: Ubuntu 5.10
Posts: 4

Rep: Reputation: 0
Talking Have to change boot order in BIOS to boot ubuntu/winxp


Order of events:
-For a year or so dual-booted winxp and ubuntu with no problems using grub
-Decided to mess with things, did a LOT of screwing with partitions and bootloaders/the MBR
-Somehow all partitions are still intact, I recovered and have windows booting using the windows bootloader
-Spent a really long time trying to get grub properly reinstalled on the ubuntu partition
-Finally realized I could boot ubuntu if I changed a bit in my menu.list and device.map and made the linux hdd the boot hdd in my BIOS
-So now I can boot both by changing that one thing in my BIOS, but would really rather be able to boot both from windows bootloader (I won't use GRUB anymore, just take this for granted please)

Now for the pertinent (I believe) and gory details:
/dev/hda1 ntfs winxp
/dev/hdb1 ext3 ubuntu

menu.lst (all comments removed):
Code:
default 0
timeout 10
title		Ubuntu, kernel 2.6.12-10-amd64-generic Default 
root		(hd0,0)
kernel		/boot/vmlinuz root=/dev/hdb1 ro quiet splash
initrd		/boot/initrd.img
savedefault
boot
When I switch the boot order back to windows then linux, I change to "root (hd1,0)" in menu.lst and switch the numbers in device.map also to reflect the linux harddrive becoming hd1 and winxp becoming hd0 according to GRUB. When I do this and try to boot from the windows bootloader I just get "GRUB _" with the underscore/cursor blinking and everything else frozen.

My boot.ini file has this line for booting Ubuntu:
Code:
C:\ubuntu.bin="Ubuntu"
And used this command to make ubuntu.bin:
Code:
sudo dd if=/dev/hdb1 of=/media/hda1/ubuntu.bin bs=512 count=1
So, what is the problem? :P
(Sorry if this is not really a software question, I was unsure)

-Minn3h
 
Old 03-31-2006, 01:43 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,739

Rep: Reputation: 298Reputation: 298Reputation: 298
The only other place I can think of to look for a cause of this problem is /etc/fstab: specifically, a discrepancy in the naming of partitions in fstab and menu.lst.

If fstab has partitions for Ubuntu on hda, and menu.lst says hdb, problem solved. Edit fstab to agree with menu.lst.
 
Old 03-31-2006, 04:09 PM   #3
Minn3h
LQ Newbie
 
Registered: Sep 2003
Distribution: Ubuntu 5.10
Posts: 4

Original Poster
Rep: Reputation: 0
Code:
proc            /proc           proc    defaults        0       0
/dev/hdb1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda1       /media/hda1     ntfs    umask=0222      0       0
/dev/hda2       /media/hda2     ntfs    umask=0222      0       0
/dev/hdd5       /media/hdd5     ntfs    umask=0222      0       0
/dev/hdb5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/hdb3       /media/hdb3     ext3    defaults        0       0
Seems to be in order?
 
Old 03-31-2006, 04:14 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,050

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Yuck !!!
However, if you insist on doing it this way, try
Code:
sudo dd if=/dev/hdb of=/media/hda1/ubuntu.bin bs=512 count=1
Current Ubuntu is 2.6.12 - NTFS write is at best "iffy" at this kernel level. Given the file size isn't ever going to change you might get away with it.
 
Old 03-31-2006, 05:11 PM   #5
Minn3h
LQ Newbie
 
Registered: Sep 2003
Distribution: Ubuntu 5.10
Posts: 4

Original Poster
Rep: Reputation: 0
Oops, I guess I oversimplified my explanation too much. That wasn't exactly the dd comand I used. I've never bothered with trying to write to ntfs partitions in linux. I did of=/home/ubuntu.bin or something and copied it over once I rebooted in windows or some such method.

It shouldn't make a difference whether I do if=/dev/hdb1 or if=/dev/hdb does it?
 
Old 03-31-2006, 06:39 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,050

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Quote:
Originally Posted by Minn3h
It shouldn't make a difference whether I do if=/dev/hdb1 or if=/dev/hdb does it?
Makes all the difference in the world. The first partition does not align to the (physical) first sector of the drive.
Try what I suggested - migrating it via some other means; a fat{32} partition, or floppy/CD maybe.
 
Old 03-31-2006, 07:17 PM   #7
Minn3h
LQ Newbie
 
Registered: Sep 2003
Distribution: Ubuntu 5.10
Posts: 4

Original Poster
Rep: Reputation: 0
Well, I tried dd if=/dev/hdb of=/home/ubuntu.bin bs=512 count=1 (instead of if=/dev/hdb1) and then replaced my old ubuntu.bin with it. When I got to the windows bootloader this time and choose "Ubuntu" the screen went black for a second or so and then went back to the windows bootloader. This as opposed to having "GRUB _" printed on my screen before the change. (And yes I modified my menu.lst and device.map to reflect that hdb became hd1 again instead of hd0)

Is this new result meaningful?
 
Old 04-01-2006, 05:17 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,050

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Sorry, I wasn't thinking - that was never going to work. Grub needs to be installed to a partition rather than the MBR, and then the boot sector record copied as you intimated before.
For the hard-disks to be recognised correctly, you probably need the Windows disk as BIOS boot disk, and grub to be reinstalled (to the root partition) from an bootable CD. Ubuntu have a live CD, but I've never used it - I always have a Knoppix CD handy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help fixing boot problem on Ubuntu/WinXp dual-boot Ay-Karamba! Linux - General 5 09-06-2005 09:20 PM
USB boot order BIOS settings NovaBurst Linux - Hardware 1 03-27-2005 11:23 PM
change boot order - Xandros coopns Linux - Newbie 1 03-24-2005 10:08 PM
how to change boot order Boomba Linux - Newbie 2 01-23-2004 07:33 AM
Change boot order? panicboy Linux - Software 6 01-21-2004 05:55 PM


All times are GMT -5. The time now is 08:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration