Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

Made a Debootstrap-script for Wheezy rootfs-generation. (no replies)

$
0
0
Hi,

I made a script that creates a complete "minbase" Wheezy-rootfs with the necessary modifications.
It even installs the kernel for you. Yes i'm not the first one here that has done it.

https://www.dropbox.com/s/424e2w7bkkcgld3/build_rootfs_kirkwood.sh?dl=0

It's based Klaus M's "build_rpi_sd_card.sh"-script (http://blog.kmp.or.at/2012/05/build-your-own-raspberry-pi-image/) with information from Vlad's Debootstrap tutorial (http://forum.doozan.com/read.php?2,5986,page=1).

For more info check the links above.
To create the installation on a sd-card e.g. just run "./build_rootfs_kirkwood.sh /dev/mmcblk0".
If you've got a harddrive, be aware that it will wipe the entire partition table - so all partitions will get deleted (including any secondary data-ones).
If you run the script without any parameters it creates a img-file that the installation is put on. Handy for later use.

Inspect the script and tell me what you think.
Packages that's needed on the host to run it is "binfmt-support qemu-user-static debootstrap kpartx lvm2".

Place the kernel-package (linux-3.18.5-kirkwood-tld-1-bodhi.tar.bz2 i.e.) in the buildenv-folder (default /root/kirkwood/).

Password for root is "debian", eth0 is set to use DHCP.
---

When done, to mount the img-file run:
kpartx -va basic_wheezy_20150209.img
mount /dev/mapper/loop0p1 /mnt/

And unmount:
cd /root/kirkwood/
/umount /mnt
kpartx -d basic_wheezy_20150209.img
---

A few lines of code is added to /etc/rc.local and /etc/init.d/halt to controll the leds on startup/shutudown.
These are for the PogoPlug Mobile/V4, so you might need to adjust it if you're running anything else.
Just check these files in Bodhis rootfs that you've might already be running.
---

Cheers,
John

Viewing all articles
Browse latest Browse all 3247

Trending Articles