USB repartitioning

I’ve just made a Haiku install/boot USB using flashnul, on a 4GB stick. Is there any way to recover the wasted space, using either Haiku or WinXP tools?
mark

flashnul works similar to dd on Unix - size of image takes up full space of partition.

I do not recall any tools to resize BFS partition so you will have to resort to other solutions below.

Download & boot LiveCD, then install to USB key ( possible? - never tested ) - you would have to use DriveSetup to redo the partition.

Use another USB key temporary to boot. Wipe out partition on 4GB, then run DriveSetup and install/copy from other USB key. Do same as previous except this time using partition on hard drive.

One way or another you’ll have to use another medium - CDR, drive partition, other USB key to boot Haiku, re-partition & copy over the OS to the 4GB key.

The CD drives on both my laptop and desktop are currently toast (and the desktop doesn’t read USBs, so it’s really time for a new machine), but the USB to USB installation sounds like it’s worth a try. I don’t have enough space on my laptop to play with alpha software. Thanks!
mark

provided that you have another 4GB drive, plug it in, when Haiku is running, initialize it as BE filesystem, copy the Haiku drives content to the new drive, then in a Terminal issue the command “makebootable NameOfYourDrive”, then boot from your new 4 GB Haiku drive.

at least this is the procedure I follow, when testing nightly builds (I admit, not with usb drives, but virtual images, but I believe it should equally work with usb as well).

You can do it how pistooli says above. I have done this with drive partitions.

Just a few changes, you can use 1 GB (or larger GB) USB key. I recall Haiku Alpha1 being around 600 MB in size unless you added additional software. You would type “makebootable /NameOfYourDrive” which you have mounted of course.

Copying Haiku over & running makebootable works.

Neither the USB Haiku not Zeta 1.21 will install to my fat32 4GB USB stick. Both versions of DriveSetup don’t want to partition the USB, either- the option is greyed out.
Just in case the software wanted to see a bootable drive, I tried makebootable in Zeta, and got:
$ makebootable /haiku
Cannot find the BIOS drive id for:

    /dev/disk/scsi/2/0/0/raw

Any further suggestions?

my suggestion above works from (and for) Haiku.

As i said above, I could not initialize the USB as BFS in Haiku or ZETA.

I also tried a Lexar tool, while in Win, to make the USB bootlable. Same results- the 4GB USB does not show up as a target in Installer, and I can’t partition or initialize it with DriveSetup.

Try deleting the fat32 partition, see if that makes a difference. Unfortunately, the only way to create BFS is through Haiku or Zeta/BeOS. I’m not sure why you get grayed out. I have only played with disk partitions myself.

There should be a command line tool. I believe it was called makebfs in BeOS. Look for Haiku’s version but be careful because you’ll have to specify the drive/partition and could write to the wrong one.

DriveSetup is the easier way to do your partitioning. What revision of Haiku are you using? Can you try with nightly r34990?

Looks like it should work:
http://dev.haiku-os.org/ticket/4383

How do I delete the fat32 partition?
I’m using 35234 gcc4 hybrid.

What’s special about r34990?

Couple big changes were done to Haiku and I believe they were after 34990 - I lost track & too lazy to look through them. I know that 34990 was stable for me, nightlies can be hit or miss depending on the changes done. That’s why good to follow the timeline to see what minor or major changes happen and for new bugs/tickets which appear afterwards.

http://dev.haiku-os.org/timeline

You should be able to delete in Windows XP. Control Panel->Admin Tools->Computer Management->Disk Management

You can try with the revision you have since it is newer and I think should be OK too - if not crashing/KDL then should be good but you’ll have to test it out.

I wish I could report success. Some of this may be progress, though.
WinXP Disk Management would not delete the partition: that option was greyed out.
I used flashnul to wipe it by writing the haiku image onto the drive (it’s the only operation I know how to do with flashnul safely).
Install in Haiku could now see the partition (reported as a 3.7GB BFS partition), and I was able to install. The result was almost identical to using flashnul to add the image. QT and Arora were added from the 1GB flash, where I had added them. DriveSetup sees it as 3.7GB, and the icon shows 450MB.
In WinXP, properties sees it as 0 bytes, and Disk Management reports 3.7GB. It still has Delete Partition greyed out.
I did visit KDL at the end, but that might have had something to do with trying to unmount the drive too early.
I’ll try some more variations.

flashnul takes the size of the image, which is around 500-600 MB for Alpha1, and writes it to the 4GB USB drive - wastes the other 3.5GB.

Somehow you need to initialize the partition with BFS to do the copy over or OS install. When you used flashnul, you said the partition was now BFS. Could you use DriveSetup on it after flashnul?

You have to initialize partition to BFS with DriveSetup (or makebfs?). This is the only way you will get the full size of the USB drive.

If you figure it out, then let us know and if not, then file a bug report so it can be looked into further by a developer.

I couldn’t do anything with DriveSetup after using flashnul to write the image.
I’ll check out makeBFS.

Alpha 2 is now installed on a 4GB flash drive (Yay!). The instructions on how to use Installer and Setup Partitions worked (though the steps are not what I would call intuitive).