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

Re: How to resize the IMG USB Live-Debian pendrive ?



On Wed, Apr 21, 2010 at 06:56:52AM +0200, yellow protoss wrote:
> Because do you know that windows XP does not like many partitions on a
> pendrive. I want to use my pendrive still under Windows XP.
> 
> So how to make the pendrive useable for storage. Come on. It is possible
> with bootable knoppix pendrives, I used it to store my data. I added a
> folder : data on the root on the pendrive and put all my Gygabites in there.
> The knoppix bootable remainns.

I wonder what it would take to make the partition with the live image
the second partition (second entry in the partition table, first on the
disk).

That said, the size of the disk is calculated as:

DU_DIM="$(du -ms binary | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LH_BINARY_FILESYSTEM})"
dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM}

http://live.debian.net/gitweb?p=live-helper.git;a=blob;f=helpers/binary_usb

Maybe add an extra variable, LH_USB_MIN_PART_SIZE (which would be
user-configurable, and defaults to 0), and then use:


DU_DIM="$(du -ms binary | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LH_BINARY_FILESYSTEM})"
if [ ${REAL_DIM} -lt ${LH_USB_MIN_PART_SIZE} ]
then
	REAL_DIM=${LH_USB_MIN_PART_SIZE}
fi
dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM}


(or fix similarly in Calculate_partition_size)

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen@xorcom.com
+972-50-7952406           mailto:tzafrir.cohen@xorcom.com
http://www.xorcom.com  iax:guest@local.xorcom.com/tzafrir


Reply to: