Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
kof94

GRUB4DOS Triple MBR from Linux

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 ;) ).

Share this post


Link to post
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 :)).

Share this post


Link to post
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 :)).

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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×