Jump to content

GRUB4DOS Triple MBR from Linux


kof94

Recommended Posts

I'm planning to write a shell script to setup a bootable UFD and I want to add an option to create a triple MBR.

From the GRUB4DOS readme I understand I can use this to add a partition boot record (see Note 2 under "Use bootlace.com to install partition boot record"):

Assumes /dev/sdb is my UFD

# ./bootlace.com --floppy=0 /dev/sdb1

I'm stuck, however, on grabbing the first 96 sectors from the device. I'm very familiar with dd but mind melts when I try to work out how many bytes I need etc.

Here's my output from fdisk:

# fdisk -l -u /dev/sdb

Disk /dev/sdb: 4009 MB, 4009754624 bytes
124 heads, 62 sectors/track, 1018 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 62 7826383 3913161 c W95 FAT32 (LBA)

If someone could please explain how to work this out I'd greatly appreciate it (cue jaclaz ;) ).

Link to comment
Share on other sites


Nevermind.

I realised this does work (what I originally tried) I just needed to create my partition on sector 95 (really helps when you read :blushing: ).

# dd if=/dev/sdb of=MYMBR96.TMP count=96 bs=512

More over, since I can write directly to the device don't have to write create little images anyway (again reading really helps here :)).

Link to comment
Share on other sites

  • 2 weeks later...
Nevermind.

I realised this does work (what I originally tried) I just needed to create my partition on sector 95 (really helps when you read :blushing: ).

# dd if=/dev/sdb of=MYMBR96.TMP count=96 bs=512

More over, since I can write directly to the device don't have to write create little images anyway (again reading really helps here :)).

What i need to do, to make a partition starting from 95 sector ?

1. Do a fresh FDISK to create a FAT12/16/32 partition starting at sector 95

(in LBA, that is, the begginning sector(MBR) is sector 0).

These step comes from grub4dos readme, and is very confusing.

//edited

ok, found this parameter. thx anyway

Edited by tompl
Link to comment
Share on other sites

Hi again,

i have made triple grub, but after booting it's looking for GRLDR. Its placed on my pendrive, fisrt and only one partition FAT32. And than it stops, without any error. I'm using the newest version of grub4dos 0.4.4

/fixed too

unable to delete those spam posts. that's sucks.

Edited by tompl
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...