Stresslinux community
USB RAW file - Printable Version

+- Stresslinux community (https://www.stresslinux.org/community)
+-- Forum: Stresslinux Main (https://www.stresslinux.org/community/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://www.stresslinux.org/community/forumdisplay.php?fid=2)
+--- Thread: USB RAW file (/showthread.php?tid=140)



USB RAW file - paul44000 - 06-15-2011

The USB .raw file unzips to 1,143,996,416 bytes which is just too large to fit onto my 1Gb USB drive.
Given that the .iso image is barely a quarter of that size, it would seem likely that it doesn't actually need to be so large.
Is there any way of shrinking the .raw file so that I can fit it onto my USB drive? (Or even a 512Mb drive for that matter)

Thanks
Paul


RE: USB RAW file - paul44000 - 06-29-2011

Well I've managed to find an answer to my own question.
The .RAW file can be mounted as a file system without too much trouble :

losetup /dev/loop1 /usr/local/src/stresslinux_64bit_11.4.x86_64-0.7.105.raw
mount -t ext3 -o loop,offset=$((512*63)) /dev/loop1 /mount/disk

I then (although its not strictly necessary) pruned the locale directories of non english localizations.

I formatted the memory stick (in my case /dev/sdb) as an ext3 partition
Next cp -pdr /mount/disk/* /dev/sdb1/ to copy the data across, and
then ran parted, set the device to /dev/sdb1 and toggled the boot flag to on

sdb1 currently shows at 609Mb, so it could be made to fit on a 512mb disk but it would require some further judicious pruning of files.