Skip to content

Instantly share code, notes, and snippets.

@uyjulian
Created August 11, 2023 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uyjulian/66983dba51eea164f2e738ff02a105c8 to your computer and use it in GitHub Desktop.
Save uyjulian/66983dba51eea164f2e738ff02a105c8 to your computer and use it in GitHub Desktop.
arch/arm/mach-dove/mv_hal_support/mvRules.mk
-T kernel
-A arm
-O linux
-C none
-a 0x00008000
-e 0x00008000
-n YOUR-Linux
-d vmlinux<tab>
#Sector 63
losetup -o 32256 /dev/loop0 /vagrant/cleanlike.dd
mkdir /mnt/mnmn
mount /dev/loop0 /mnt/mnmn
mkdir lol
tar -xpmf /vagrant/itsfunroot.tar --numeric-owner -C lol
tar -xpmf /vagrant/itsfunwritable.tar --numeric-owner -C lol
mksquashfs squashfs-root /mnt/mnmn/filesystem.squash -b 1M -no-xattrs
sync
umount /mnt/mnmn
losetup -d /dev/loop0
Raw image http://old-releases.ubuntu.com/releases/ports/releases/lucid/
dd if=/dev/zero of=ofof bs=512 count=4194304
mkfs.ext4 Mon<tab>/ofof
mkdir /mnt/mnmn
mount -o loop Mon<tab>/ofof
tar -cp --one-file-system / | tar -xp -C /mnt/mnmn --numeric-owner
mount -o remount,create=mfs /
mount -o remount,cpup=bu /
mount -o remount,prepend:/mnt/mnmn=rw /
#Extract shi
#Create backup
tar -cpf itsfunroot.tar --one-file-system /
tar -cpf itsfunwritable.tar --one-file-system /writable/
#Reinstall everything
#First, fix broken links in /usr/lib/locale
#Ifupdown, sudo
for package in `dpkg --get-selections | grep -w 'install$' | cut -f 1`; do apt-get -o Dpkg::Options::="--force-confmiss" install --yes --reinstall $package; apt-get clean;done
cd /mnt
mkdir mnmn
mkfs.ext4 Monst<tab>/ofof
mount -o loop Monst<tab>/ofof mnmn
mount -o remount,create=mfs /
mount -o remount,cpup=bu /
mount -o remount,prepend:/mnt/mnmn=rw /
xarinstall Monst<tab>/lol.xar
tar -xvpzf /path/to/backup.tar.gz -C /media/whatever --numeric-owner
losetup -o 32256 /dev/loop0 /vagrant/clean.dd
mount /dev/loop0 /mnt/mn
cat /dev/zero > zero.file;sync;rm zero.file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment