Created
November 11, 2011 16:28
-
-
Save albanpeignier/1358431 to your computer and use it in GitHub Desktop.
Recette d'une bonne Box 1/3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Confirm you want install box image (dist/disk) in /dev/sdb [y/N] :y | |
| Formatting filesystem | |
| * echo ',,L,*' | sudo /sbin/sfdisk -f -uS /dev/sdb | |
| * grep -q /dev/sdb1 /proc/mounts && sudo umount /dev/sdb1 || true | |
| * sudo mke2fs -L boot /dev/sdb1 | |
| Copy files | |
| * sudo mount -o loop,offset=32768 dist/disk /tmp/disk-20111111-13940-14nn789 | |
| * sudo mount /dev/sdb1 /tmp/sdb1-20111111-13940-15tucum | |
| * sudo rsync -av /tmp/disk-20111111-13940-14nn789/ /tmp/sdb1-20111111-13940-15tucum/ | |
| * sudo umount /tmp/sdb1-20111111-13940-15tucum | |
| * sudo umount /tmp/disk-20111111-13940-14nn789 | |
| * sudo mount /dev/sdb1 /tmp/sdb1-20111111-13940-1td5ipc | |
| * sudo mount -o loop /tmp/sdb1-20111111-13940-1td5ipc/filesystem.squashfs /tmp/filesystem.squashfs-20111111-13940-8wjaec | |
| * sudo mount -o bind /tmp/sdb1-20111111-13940-1td5ipc /tmp/filesystem.squashfs-20111111-13940-8wjaec/boot | |
| * sudo mount proc /tmp/filesystem.squashfs-20111111-13940-8wjaec/proc -t proc | |
| * sudo mount -o bind /dev /tmp/filesystem.squashfs-20111111-13940-8wjaec/dev | |
| * sudo chroot /tmp/filesystem.squashfs-20111111-13940-8wjaec /usr/sbin/extlinux --install /boot | |
| * sudo umount /tmp/filesystem.squashfs-20111111-13940-8wjaec/proc | |
| * sudo umount /tmp/filesystem.squashfs-20111111-13940-8wjaec/dev | |
| * sudo umount /tmp/filesystem.squashfs-20111111-13940-8wjaec/boot | |
| * sudo umount /tmp/filesystem.squashfs-20111111-13940-8wjaec | |
| * sudo umount /tmp/sdb1-20111111-13940-1td5ipc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment