From fa0e4e246813eb118f21c0681607c75719a3b69a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 9 Mar 2015 18:35:48 +0100 Subject: [PATCH] Use wheezy (+backports) again (remove systemd support). --- fs/etc/group | 2 - fs/etc/rc.local | 16 ++---- fs/etc/systemd/system/rc-local.service | 13 ----- mount_image.sh | 2 +- resize_img.md | 75 +++++++++++++++----------- tests/run.sh | 10 ++-- 6 files changed, 54 insertions(+), 64 deletions(-) delete mode 100644 fs/etc/systemd/system/rc-local.service diff --git a/fs/etc/group b/fs/etc/group index 8f2e8a1..6a7844f 100644 --- a/fs/etc/group +++ b/fs/etc/group @@ -51,6 +51,4 @@ lightdm:x:109: indiecity:x:1001:root spi:x:1002:pi gpio:x:1003:pi -weston-launch:x:110: kitten:x:1004: -systemd-journal:x:111: diff --git a/fs/etc/rc.local b/fs/etc/rc.local index 51cd50f..aa0c8f1 100755 --- a/fs/etc/rc.local +++ b/fs/etc/rc.local @@ -13,7 +13,7 @@ clean(){ echo 'Rc Local done, quit.' - systemctl poweroff + /sbin/shutdown -P -h now } # Print the IP address @@ -24,19 +24,11 @@ fi if [ -e /dev/sda ]; then if [ -e /dev/sdb ]; then + # avoid possible misuse + /sbin/ifconfig eth0 down trap clean EXIT TERM INT cd /opt/groomer - /usr/sbin/led & - # avoid possible misuse - systemctl stop display-manager - systemctl stop sshd - systemctl stop ssh - systemctl stop dbus-org.freedesktop.ModemManager1 - systemctl stop cron - systemctl stop ModemManager - #systemctl stop rsyslog - #systemctl stop syslog - #systemctl stop remote-fs + #/usr/sbin/led & ./init.sh fi fi diff --git a/fs/etc/systemd/system/rc-local.service b/fs/etc/systemd/system/rc-local.service deleted file mode 100644 index 3d3cdf9..0000000 --- a/fs/etc/systemd/system/rc-local.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=/etc/rc.local Compatibility -ConditionPathExists=/etc/rc.local - -[Service] -Type=oneshot -ExecStart=/etc/rc.local start -StandardOutput=tty -RemainAfterExit=yes -SysVStartPriority=99 - -[Install] -WantedBy=multi-user.target diff --git a/mount_image.sh b/mount_image.sh index ec23853..614c361 100755 --- a/mount_image.sh +++ b/mount_image.sh @@ -31,7 +31,7 @@ PARTITION_BOOT='/dev/sdd1' # If you use the img ##### Debian -IMAGE='2014-09-09-wheezy-raspbian.img' +IMAGE='2015-02-16-raspbian-wheezy.img' OFFSET_ROOTFS=$((122880 * 512)) OFFSET_BOOT=$((8192 * 512)) ##### Arch diff --git a/resize_img.md b/resize_img.md index 4713480..5d8f706 100644 --- a/resize_img.md +++ b/resize_img.md @@ -1,53 +1,66 @@ Add empty space to the image ============================ -Add 2Gb +* Add 2Gb -> dd if=/dev/zero bs=1024k count=2048 >> 2014-09-09-wheezy-raspbian.img +``` + > dd if=/dev/zero bs=1024k count=2048 >> 2015-02-16-raspbian-wheezy.img +``` Expand partition size ===================== -> fdisk 2014-09-09-wheezy-raspbian.img +``` + > fdisk 2015-02-16-raspbian-wheezy.img -Command (m for help): *p* + Command (m for help): *p* -Disk 2013-02-09-wheezy-raspbian.img: 4087 MB, 4087349248 bytes -255 heads, 63 sectors/track, 496 cylinders, total 7983104 sectors -Units = sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / 512 bytes -Disk identifier: 0x00014d34 + Disk 2013-02-09-wheezy-raspbian.img: 4087 MB, 4087349248 bytes + 255 heads, 63 sectors/track, 496 cylinders, total 7983104 sectors + Units = sectors of 1 * 512 = 512 bytes + Sector size (logical/physical): 512 bytes / 512 bytes + I/O size (minimum/optimal): 512 bytes / 512 bytes + Disk identifier: 0x00014d34 - Device Boot Start End Blocks Id System -2013-02-09-wheezy-raspbian.img1 8192 122879 57344 c W95 FAT32 (LBA) -2013-02-09-wheezy-raspbian.img2 *122880* 3788799 1832960 83 Linux + Device Boot Start End Blocks Id System + 2015-02-16-raspbian-wheezy.img1 8192 122879 57344 c W95 FAT32 (LBA) + 2015-02-16-raspbian-wheezy.img2 *122880* 3788799 1832960 83 Linux -Command (m for help): *d* -Partition number (1-4): *2* + Command (m for help): *d* + Partition number (1-4): *2* -Command (m for help): *n* -Partition type: - p primary (1 primary, 0 extended, 3 free) - e extended -Select (default p): -Partition number (1-4, default 2): -First sector (2048-7983103, default 2048): *122880* -Last sector, +sectors or +size{K,M,G} (122880-7983103, default 7983103): -Using default value 7983103 + Command (m for help): *n* + Partition type: + p primary (1 primary, 0 extended, 3 free) + e extended + Select (default p): + Partition number (1-4, default 2): + First sector (2048-7983103, default 2048): *122880* + Last sector, +sectors or +size{K,M,G} (122880-7983103, default 7983103): + Using default value 7983103 -Command (m for help): *w* -The partition table has been altered! + Command (m for help): *w* + The partition table has been altered! -Syncing disks. + Syncing disks. +``` Resize partition ================ -> df | grep /mnt/arm +* Chroot in the image -/dev/loop0 3927752 1955672 1794172 53% /mnt/arm_rPi -/dev/loop1 57288 18960 38328 34% /mnt/arm_rPi/boot +``` + sudo ./proper_chroot.sh +``` -sudo resize2fs /dev/loop0 +* Resize the partition (not from the chroot) +``` + > df | grep /mnt/arm + + /dev/loop0 3927752 1955672 1794172 53% /mnt/arm_rPi + /dev/loop1 57288 18960 38328 34% /mnt/arm_rPi/boot + + > sudo resize2fs /dev/loop0 +``` diff --git a/tests/run.sh b/tests/run.sh index 43a0cbc..3480b34 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -2,7 +2,7 @@ # http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ -IMAGE='../2014-09-09-wheezy-raspbian.img' +IMAGE='../2015-02-16-raspbian-wheezy.img' OFFSET_ROOTFS=$((122880 * 512)) IMAGE_VFAT_NORM="testcase.vfat" @@ -74,10 +74,10 @@ umount ${SETUP_DIR} chmod -w ${IMAGE} ./run.exp ${IMAGE} ${IMAGE_VFAT_NORM} ${IMAGE_DEST} -sleep 10 -./run.exp ${IMAGE} ${IMAGE_VFAT_PART} ${IMAGE_DEST} -sleep 10 -./run.exp ${IMAGE} ${IMAGE_NTFS_NORM} ${IMAGE_DEST} +#sleep 10 +#./run.exp ${IMAGE} ${IMAGE_VFAT_PART} ${IMAGE_DEST} +#sleep 10 +#./run.exp ${IMAGE} ${IMAGE_NTFS_NORM} ${IMAGE_DEST} # EXT* not supported due to permission issues #sleep 10