LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-09-2004, 09:21 AM   #1
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Rep: Reputation: 15
Write to MBR while in the command line?


Hey all,

I have installed Slackware and if you want to see where I'm at you can view the following posts:

------------------------

http://www.linuxquestions.org/questi...hreadid=179481

and

http://www.linuxquestions.org/questi...hreadid=179416

------------------------

Anyway, apparently I have the lilo.conf file in the wrong place, b/c if I boot my system up without any CD's or bootdisks and it will boot straight into Windows XP. I need a way (from the command line interface) to move the lilo.conf (which is in /dev/hdf4) to the MBR (/dev/hde i think...) how can I do that? I am relatively new with the different commands but I can usually figure them out pretty fast when told which ones to use.

Thanks!
Erik
 
Old 05-09-2004, 10:27 AM   #2
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
your lilo.conf needs to be in /etc/ not the MBR. You then need to run the command
lilo -v
to actually install the bootloader. If it did not get written to the MBR, there's something wrong with your /etc/lilo.conf. Just post its contents and someone will be able to tell you how to fix it.
 
Old 05-09-2004, 10:42 AM   #3
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
Hey, I have recently tried:

below information from - http://www.linuxquestions.org/questi...hreadid=179481
Quote:
Ok, well I "kinda" figured it out...
I did what you said in order to create that bootsect.lnx file and then I used this command "# mcopy /bootsect.lnx a:" to copy it to a floppy disk. Then I booted into Windows XP and told it to show hidden folders and system files, I opened up c:\boot.ini with notepad (and turned of word wrap) and then I pasted "c:\bootsect.lnx="Slackware Linux" as the last line. I rebooted the system and I was given the menu that asks you to select your OS and I selected "Slackware Linux" and pressed enter. Then all I got was a screen that said "L" and that's all it said, nothing else happens after that.... What did I do wrong?
So, now I am gonna give what you said a try instead. I'll post what the lilo.conf file contains in just a few minutes if I can figure that out.

Thanks,
Erik
 
Old 05-09-2004, 10:50 AM   #4
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
My lilo.conf file is set up like so:

Quote:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hdf4
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hdf4
label = Slackware Linux
read-only
image = /windows
root = /dev/hde
label = Windows XP
read-only
# Linux bootable partition config ends
To me everything looks to be in there correctly as my Windows XP is installed on /dev/hde and Slackware Linux is installed on /dev/hdf4

I just need to put the lilo.conf file on the MBR (master boot record) on /dev/hde

That is what I need to figure out how to do, I am gonna look at the instructions you recently provided.

BRB
 
Old 05-09-2004, 10:53 AM   #5
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
Well my Windows image location may be incorrect, b/c I added that in the past.. and I don't know if I have it setup where it will choose automatically (fast detect) or if it will give me like 30 seconds or so to choose the option I want.
 
Old 05-10-2004, 11:48 AM   #6
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
change the line
boot=/dev/hdf4
to
boot=/dev/hde
without partiton number - /dev/hdf4 writes the bootloader to partition 4 of hdf.
Then run
lilo -v

Make sure you have a working boot-floppy in case things go wrong.
 
Old 05-10-2004, 11:49 AM   #7
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
Forgot to mention that your lines for windows look wrong. Should be something like:
other=/dev/hda1
label="windows"
table=/dev/hde
 
Old 05-10-2004, 10:04 PM   #8
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
Ok I will fix that but I tried the "lilo -v" command and it said:

Quote:
Warning: LBA32 addressing assumed
Reading boot sector from /dev/hde
Fatal: geo_query_dev HDIO_GETGEO (dev 0x2100): Inappropriate ioctl for device
Any ideas on what that means? LBA32 is something to do with my hdd right? How can I fix this?

Thanks,
Erik
 
Old 05-10-2004, 10:08 PM   #9
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
By the way, my /dev/hde (80GB hdd with Windows installed on it) does work, b/c Windows will still boot from it. Lately I have been getting into Linux by using the bootdisk (floppy) that it created, but of course I don't want to continue doing it this way.
 
Old 05-11-2004, 10:43 AM   #10
quatsch
LQ Addict
 
Registered: Aug 2003
Location: New York, NY
Distribution: gentoo, gentooPPC
Posts: 1,661

Rep: Reputation: 48
hmm. that's beyond my abilities. it has problems with the geometry of the hd or something like that.

You might try grub instead of lilo - I don't know much about grub b/c I've never used it but I'm sure there are tons of threads here dealing with installing grub.
 
Old 05-11-2004, 11:04 PM   #11
EThitop
Member
 
Registered: May 2004
Distribution: Slackware 10
Posts: 146

Original Poster
Rep: Reputation: 15
Well, I may have found the answer to this! Though I have not tried it yet, I will soon. While in KDE, I took a look at Control Center --> System Administration --> Linux Kernel. Linux Kernel has plenty of settings you can easily enable/disable, etc... Then I went to ATA/IDE/MFM/RLL support --> IDE, ATA and Atapi Block devices --> Auto Geometry Resizing support. This sections info says the following:

Quote:
CONFIG_IDEDISK_STROKE

Should you have a system w/ an AWARD Bios and your drives are larger than 32GB and it will not boot, one is required to perform a few OEM operations first. The option is called "STROKE" because it allows one to "soft clip" the drive to work around a barrier limit. For Maxtor drives it is called "jumpon.exe". Please search Maxtor's web-site for "JUMPON.EXE". IBM has a similar tool at: <http://www.storage.ibm.com/hdd/support/download.htm>.
I have a Western Digital drive, I will read more into this but I think I am going to give it a try.
 
  


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
How write new MBR using command line only lonecrow Linux - Newbie 2 11-02-2005 10:17 AM
Can somebody like share me to write files to DVD disc in command line? exper Linux - Software 3 08-11-2004 07:58 PM
Does LoadLin write to the MBR? jhecht Linux - Software 1 06-25-2004 10:50 AM
How to install Grub bootloader to MBR from command line sleddog Linux - Software 2 04-08-2004 02:17 PM
mbr had over write so lilo is gone how to rewrite lilo to mbr mch Linux - Software 4 10-25-2002 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:30 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