Author Topic: boot1f32 and fat partitions?  (Read 5187 times)

0 Members and 1 Guest are viewing this topic.

corona

  • Entrant
  • Posts: 2
boot1f32 and fat partitions?
« on: June 01, 2010, 10:54:00 PM »
Hi,
I would really like to get a fat32 USB key with chameleon on it to use as a general bootloader test disk. I particularly want to use fat32 so as to have access to the boot.plist settings from windows without having to install hfs drivers.

From everything I've read boot1f32 should be the way to do this, but dd'ing it onto the start of a freshly formatted fat partition always kills the partition (dd if=boot1f32 of=/dev/rdisk2s1), ie unplugging usb and replugging it and the partition is unreadable.
The only thing I can find that's likely to be the problem is the the FAT BPB which is somewhere inside that first 512 bytes, but I'm not sure where, obviously overwriting my fat header with whatever the BPB in the boot1f32 file is would kill it.
I've got the same usb drive botting chameleon fine with the first partition hfs and using boot1h, but is there any way to make it work as fat32?

Does anyone know how to get boot1f32 onto a fat32 partition without trashing the partition?

Thanks,
Andrew

corona

  • Entrant
  • Posts: 2
Re: boot1f32 and fat partitions?
« Reply #1 on: June 02, 2010, 03:46:44 AM »
to answer my own question:

Ok, the source for boot1f32 had the key, but not the lock to put it into..... a comment with a dd command.
It's the correct command to copy the BPB (and/or the rest of the critical bits) from your partition to the boot1f32 file.
However, when I tried to run it directly on the drive (in osx) it complained that it was an invalid argument. I've just tried running it on a bootsector image that's saved to file first, and it worked! This is possible the long way around, but it has worked, and I'll optimize it a bit later one if I find time.
So without further ado...

[HOWTO] Install Chameleon onto FAT32 Drive
This has only been tested on Linux so far, but it should work from osx too. This requires some basic command line knowledge on how to navigate, find the relevant files etc.

1 ) Format the relevant partition (I used MBR partitions, which then has to be a primary one) as fat32 (or msdos from Disk utility).

2 )  find the correct dev for the partition - replace sda / sda1 with your correct drive path in all further steps!!
Linux: /dev/sda1 or similar
OSX: /dev/rdisk0s1 or similar

3 ) Get a command line / Terminal and type:
Code: [Select]
sudo dd if=/dev/sda1 of=blank_part.bin bs=512 count=1now you've got a copy of the blank partition header.

4 ) Find boot1f32 and make a copy of it
Code: [Select]
sudo cp boot1f32 boot1f32.local
5 ) Update your copy to include the relevant partition information
Code: [Select]
sudo dd if=blank_part.bin of=boot1f32.local skip=3 seek=3 bs=1 count=87 conv=notrunc
6 ) Now you've got a boot1f32 that's customized to your partition, write it onto it - get the drive path right!
Code: [Select]
dd if=boot1f32.local of=/dev/sda1 bs=512 count=1
7 ) And update the boot0 code the normal way... check the drive paths again to be sure!
for linux:
Code: [Select]
sudo dd if=boot0 of=/dev/sda bs=440 count=1
for mac:
Code: [Select]
sudo fdisk -f boot0 -u -y /dev/rdisk0
8 ) and copy the boot file (from chameleon) onto the partition (mount it first)
Code: [Select]
sudo cp boot /mnt/sda1 or...
Code: [Select]
sudo cp boot /Volumes/boot or similar...

and copy any other relevant files / Extra folder and so on as per usual chameleon install

Cross fingers and Reboot!

Hope this helps someone else,
Andrew

Gringo Vermelho

  • Forum Moderator
  • Posts: 611
  • The gray monster energy hat
Re: boot1f32 and fat partitions?
« Reply #2 on: June 02, 2010, 04:39:38 PM »
Nice work, thanks for the guide.
10.9.5 - ASUS P8Z77-V Pro - i5 3570K - GTX 660 - Chameleon 2.3 svn-r2xxx
How to...
Install Chameleon: http://forum.voodooprojects.org/index.php/topic,649
Make your own Chameleon boot CD: http://forum.voodooprojects.org/index.php/topic,484.msg2131.html#msg2131

staticanime

  • Member
  • Posts: 45
Re: boot1f32 and fat partitions?
« Reply #3 on: June 19, 2010, 06:42:32 PM »
So, using this, would it be possible to use the EFI partition in it's FAT32 form, rather than re-formatting it HFS+ (which can cause issues with multi-boot, especially linux and gptsync)

ulex

  • Entrant
  • Posts: 1
Re: boot1f32 and fat partitions?
« Reply #4 on: July 09, 2010, 08:02:29 AM »
Thanks a lot, you've saved me from re-installing osx. I had to format my usbstick with hfs+ and working chameleon on it. Luckily i've backed up Extra. Then I've tried all kinds of shit with recreating hfsplus on linux using mbr and GPT, nothing worked.

This did, thanks!