Sponsored Content
Full Discussion: BSD equivalent of GNU parted
Top Forums UNIX for Dummies Questions & Answers BSD equivalent of GNU parted Post 302298561 by pludi on Wednesday 18th of March 2009 02:02:29 AM
Old 03-18-2009
Quote:
Originally Posted by uiop44
[...]
How does the boot process work? Someone please correct this if this is wrong...

1. BIOS ROM reads MBR of 1st disk
2. MBR reads boot sector of active (primary) partition (the one with the boot flag)
3. Bootloader on that partition boots the OS it was designed for
[...]
Basically correct so far.
Quote:
Originally Posted by uiop44
You can have up to 4 partitions and hence 4 OS's specified to the MBR... these are the four 16 byte table entries often called the partition table. They're tacked onto the MBR. Selecting a partition (OS) to boot from is as easy as setting a flag (0x00 --> 0x80 at offset 0x000) in this table.
One correction: you can have 4 primary/extended partitons when using DOS disklabels. Each extended can have up to 4 logical partitions. BSD disklabels allow for up to 8 partitons/slices, but that would probably break Windows booting.

Quote:
Originally Posted by uiop44
[...]
You have to insert this (foreign) bootloader into the process, between steps 2 and 3
The MBR has to find the foreign bootloader
I do not understand exactly how that works
[...]
When you install the bootloader (eg GRUB) into the partitions boot section, then yes, the MBR has to find the bootloader. If you install it into the MBR, however, it's this (simplified) scheme
  1. Load the bootloader (GRUB/LILO/...)
  2. Select the OS you want to boot & that the bootloader knows about
  3. The bootloader then loads the usual startup code from the partitions bootsector
GRUB has the added bonus that it knows about filesystems and can read it's configuration from there, meaning you can modify and use it without having to reinstall the bootloader (as was the case with LILO).

Quote:
Originally Posted by uiop44
There is a simpler more direct way

If you are only booting a few OS's and have the disk space to create a few primary partitions, why be so indirect when booting? Make the partition you want active and let the boot process proceed as it is expected to do... by the people who develop these OS's.
Bootloaders usually don't interfere with this. As soon as the user made his/her selection, control is handed back to the OS for the booting process. Said OS isn't even aware that there was a bootloader involved.
 

7 More Discussions You Might Find Interesting

1. BSD

for linux and BSD users interested in Unix system V/bsd

for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide. ... (0 Replies)
Discussion started by: moxxx68
0 Replies

2. UNIX for Dummies Questions & Answers

I've created a partition with GNU Parted, how do I mount the partition?

I've created a partition with GNU Parted, how do I mount the partition? The manual information at http://www.gnu.org/software/parted/manual/parted.html is good, but I am sure about how I mount the partition afterwards. Thanks, --Todd (1 Reply)
Discussion started by: jtp51
1 Replies

3. BSD

Anyone using GNU BSD?

Is anyone using or planning to use GNU BSD in production yet? I'd like to hear experiences. (Debian GNU/NetBSD) (8 Replies)
Discussion started by: vpsville
8 Replies

4. BSD

BSD equivalent of rmmod

In Linux if you want to get rid of the PC speaker (beep!) without rebooting you can type rmmod pcspkr I'm looking for a way to remove (if possible) the BSD equivalent of the "pcspkr" module. I scrolled quickly through GENERIC and didn't see any entries that looked conspicuously like the... (2 Replies)
Discussion started by: uiop44
2 Replies

5. Shell Programming and Scripting

AIX equivalent to GNU grep's -B and -A [print lines after or before matching lines]

Hi folks I am not allowed to install GNU grep on AIX. Here my code excerpt: grep_fatal () { /usr/sfw/bin/gegrep -B4 -A2 "FATAL|QUEUE|SIGHUP" } Howto the same on AIX based machine? from manual GNU grep ‘--after-context=num’ Print num lines of trailing context after... (4 Replies)
Discussion started by: slashdotweenie
4 Replies

6. Linux

Date from GNU to BSD

Dear all, This should be simple but I cannot figure it out despite reading all the man pages. Could someone please help me translate this code (GNU date) to one that can be read by BSD date?: myDate=$(date -d "$h -$l days" +%Y/%m/%d), where h is a variable of the form DD/MM/YYYY, and l is... (3 Replies)
Discussion started by: thomchad
3 Replies

7. Shell Programming and Scripting

GNU & BSD Makefile Directives & Conditions Compatibility

Firstly, I would like to apologize if this is not the appropriate sub-forum to post about GNU/BSD makefile scripting. Though my code is in C++, because I am focusing on the makefile I thought it would go better in shell scripting. Please correct me if I am wrong. Secondly, I am not interested in... (0 Replies)
Discussion started by: AntumDeluge
0 Replies
All times are GMT -4. The time now is 01:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy