LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-14-2008, 06:59 AM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Rep: Reputation: 30
Boot Disk and MBR question.


Hello there.
My system boots perfectly via Grub. Upon start up I get a Grub boot splash screen which gives me the choice of 3 different systems to boot into.
Now I decided to make a boot disk of sorts :

Code:
$ sudo dd if=/dev/hda of=/dev/fd0 count=1 bs=446
This I understand copies the boot record but not the partition table.
I can boot from this floppy and get the usual grub boot splash screen which offers me my 3 choices of OS again. Could someone kindly explain what is exactly copied during the above dd command. Is it the instructions for the computer to use the "grub" on the hda and its related menu.lst file to boot the computer ? I just need clarifying as to what instructions these magical 446 bytes contain. Correct me if I'm wrong but what parts of grub are found in the mbr ?
Is the above method a good and quick way to make a boot floppy for a specific system without having to install grub and all its related files onto the floppy disk ? Should I change "bs=446" to "bs=512" ?

Cheers,

Uc
 
Old 02-14-2008, 08:01 AM   #2
bitpicker
Member
 
Registered: Jul 2003
Location: Germany
Distribution: Xubuntu, Ubuntu
Posts: 416
Blog Entries: 14

Rep: Reputation: 35
The command copies the initial part of the boot record. If you extend it to 512 it also includes the partition table. A real boot record with the information belonging to grub etc. is larger than that; this first part only contains the information where to look for the rest. On your system, that's enough to boot your system, but take the disk to any other computer and it won't work.

Probably more than you wanted to know about that:

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

Robin
 
Old 02-14-2008, 08:02 AM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
I'm pretty sure you have copied stage 1 of GRUB from hda.

I'm pretty sure stage 1 was customized when installed to include the exact physical location of stage 1.5, so it wouldn't be a correct stage 1 for some other sda.
 
Old 02-14-2008, 08:03 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
bitpicker beat me to it.

Last edited by bigrigdriver; 02-14-2008 at 08:05 AM.
 
Old 02-14-2008, 09:41 AM   #5
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Fedora 14, Ubuntu , Slax 5.1.8, OpenSolaris, Centos 4.8
Posts: 296

Original Poster
Rep: Reputation: 30
Excellent ! Thanks a lot for the replies guys. Cleared some things up

Thanks again,

uncle-c
 
  


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
Boot disk question plisken Linux - General 1 02-24-2007 08:09 AM
"Disk boot failure..." after lilo writes to the MBR alexko Linux - Hardware 6 11-16-2004 10:43 AM
What if your MBR (grep) is deleted by xp during install and no boot disk available? FocusedWolf Linux - Newbie 8 05-05-2004 11:12 PM
boot disk question digitalc Linux - General 1 02-02-2004 12:32 PM
Dual boot, linux MBR on floppy question? Dobie Linux - Newbie 1 12-15-2003 11:19 AM


All times are GMT -5. The time now is 06:53 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration