Last active
August 26, 2018 04:11
-
-
Save alex2844/f506f5b89bad195a6f499f52eff72ad2 to your computer and use it in GitHub Desktop.
This file contains 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
RECOVERY='chromeos_10452.96.0_asuka_recovery_stable-channel_mp' | |
echo 'cd ~/Downloads/' >> ~/.bashrc | |
mkdir /home/chronos/image /home/chronos/local /home/chronos/user/Downloads/boot | |
cd /home/chronos/user/Downloads/boot | |
wget https://dl.google.com/dl/edgedl/chromeos/recovery/$RECOVERY.bin.zip | |
unzip $RECOVERY.bin.zip | |
sudo losetup -fP $RECOVERY.bin | |
sudo mkfs.ext4 /dev/sda5 | |
sudo mount /dev/sda5 /home/chronos/local | |
sudo mount /dev/loop1p3 /home/chronos/image -o loop,ro | |
sudo cp -av /home/chronos/image/* /home/chronos/local | |
sudo rm -rf /home/chronos/local/etc/modprobe.d/* /home/chronos/local/lib/firmware /home/chronos/local/lib/modules/$(ls /home/chronos/local/lib/modules/) | |
sudo cp -av /lib/firmware /home/chronos/local/lib/modules/ | |
sudo cp -av /lib/modules/$(uname -r) /home/chronos/local/lib/modules/ | |
sudo cp -av /etc/modprobe.d/* /home/chronos/local/etc/modprobe.d/ | |
sudo sed '0,/enforcing/s/enforcing/permissive/' -i /home/chronos/local/etc/selinux/config | |
sudo mount --rw /dev/sda12 /mnt | |
echo 'menuentry "Chrome OS" { linux /syslinux/vmlinuz.A init=/sbin/init boot=local rootwait ro noresume noswap loglevel =7 noinitrd console= i915.modeset=1 cros_efi cros_debug root=/dev/sda5 }' | sudo tee -a /mnt/efi/boot/grub.cfg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment