[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Add a partition into the binary image



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yohann Lepage wrote:
> 2009/1/19 Tzafrir Cohen <tzafrir.cohen@xorcom.com>:
>> You can also use sfdisk or parted as part of the installation (after
>> the dd).
> There is an example here [1]. This script create a partition which
> uses free space on usb drive.
> It's not fully automatic (you must unplug and plug again the key after
> sfdisk) because i didn't found how read again partition table after
> using  sfdisk.
> http://github.com/2xyo/satan/raw/5860104316dad503beebbd4ec5dfa859f178f3f6/install_satan.sh
> 

I will try to use the functions and helpers from live-helper. I did a
quick test and it seems that this works:

# dd if=/dev/zero of=final.img bs=256M count=1
# dd if=binary.img of=final.img conv=notrunc
# losetup /dev/loop0 final.img
# fdisk /dev/loop0  <-- create the new partition
# losetup -d /dev/loop0
# losetup.sh /dev/loop0 final.img 1
# mkfs.ext3 -L live-rw -F /dev/loop0
# losetup -d /dev/loop0

I will probably look at your script for the "create the new partition"
step. Maybe live-helper has some functions for this too.

Regards,

Cyril

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl06lMACgkQlYy8cEwUMaR8OwCffTRb8feUxgaBsj1m+avyMiBO
KtEAn3sZOMwm5iXxGN6ysSTcpvnJqbAr
=U+yV
-----END PGP SIGNATURE-----


Reply to: