View Single Post
Old 10-21-2013, 07:38 PM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
the following example will make the seed 500MB into a 2 Gb partition

FILENAME=/mnt/base-us/deb.5gb.ext3
dd if=/dev/zero of=$FILENAME bs=1M count=1500 oflag=append conv=notrunc
e2fsck -f $FILENAME
resize2fs $FILENAME


(You can choose ANY size just swap the 1500 for however many MB you want ADDED)
SEE THIS POST FOR A KINDLE DD THAT SUPPORTS THE RIGHT OPTIONS, (or do it on your PC)

That seems an efficient solution.

Alternately as pointed out by Icantbebothered:
FILENAME=/mnt/base-us/deb.5gb.ext3
dd if=/dev/zero bs=1M count=512 >> $FILENAME
e2fsck -f $FILENAME
resize2fs $FILENAME


that last command is to be used on a NON MOUNTED system only...

Spoiler:
Code:
#!/bin/sh
unset LD_PRELOAD
rm /dev/loop/debian
mknod -m0660 /dev/loop/debian b 7 250
echo "[*] Mounting Rootfs..."
/bin/mount -o loop=/dev/loop/debian,noatime -t ext3 /mnt/base-us/debian.ext3 /mnt/us/debian
echo "[*] Preparing Filesystem..."
/bin/mount -o bind /dev /mnt/us/debian/dev
/bin/mount -o bind /proc /mnt/us/debian/proc
/bin/mount -o bind /sys /mnt/us/debian/sys
/bin/mount -o bind /dev/pts /mnt/us/debian/dev/pts

#optionally make the kindle available inside debian...
#mount -o bind /mnt/base-us /mnt/us/debian/kindle/mnt/us
#mount -o bind /mnt/base-us /mnt/us/debian/kindle/mnt/base-us

echo "[*] Preparing Network Connections..."
cp /etc/hosts /mnt/us/debian/etc/hosts
cp /etc/resolv.conf /mnt/us/debian/etc/resolv.conf
echo "[*] Starting Debian shell..."
chroot /mnt/us/debian /bin/bash $@
#chroot /mnt/debian 
echo
echo "[*] Unmounting Rootfs..."

#optionally remove that kindle inside the debian stuff
#umount /mnt/us/debian/kindle/mnt/us
#umount /mnt/us/debian/kindle/mnt/base-us

/bin/umount /mnt/us/debian/dev/pts
/bin/umount /mnt/us/debian/dev
/bin/umount /mnt/us/debian/proc
/bin/umount /mnt/us/debian/sys
/bin/umount -d /mnt/us/debian
echo "[*] Debian unmounted."

Last edited by twobob; 10-21-2013 at 08:02 PM.
twobob is offline   Reply With Quote