Installing Debian as an upgrade/script: Difference between revisions
m (Reverted edits by Vandal (Talk); changed back to last version by 65.75.18.227) |
No edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
The following script, which only follows the instructions on [[Installing Debian as an upgrade]], should install Debian on your XO. Just copy/paste it into a file on the XO, chmod +x, and run. I just tested it, and it worked. YMMV. It will stop midway if there is any error, including in the wget image download. |
The following script, which only follows the instructions on [[Installing Debian as an upgrade]], should install Debian on your XO. Just copy/paste it into a file on the XO, chmod +x, and run. I just tested it, and it worked. YMMV. It will stop midway if there is any error, including in the wget image download.<br> |
||
<br>So in steps:<br> |
|||
1. Highlight script below that starts with "#!/bin/bash ex ......." and copy (Ctrl+C)<br> |
|||
2. Enter Terminal and become root by typing "su" and return.<br> |
|||
3. Make a script file by typing "nano install-script", nano should launch, then<br> |
|||
4. Paste the script into nano by clicking on the tab at the top of the Terminal Activity titled "Edit" and click on the right hand icon that has an arrow pointing down (Paste).<br> |
|||
5. Exit and Save from nano with Ctrl+X, then selecting "y"<br> |
|||
6. Then change the script file into an executable script file by typing: "chmod +x install-script"<br> |
|||
7. Execute the script by typing "./install-script" and enter, kick back for awhile and watch it go.(~15 minutes or so? until it finally displays "bash-3.2#" or something ending in "...#"<br> |
|||
(However I just ran it and it stopped at line 28, just after "+ chmod a+rx ........unfreeze.sh" perhaps because of excess spaces in the next command line)<br> |
|||
(I got same error!) |
|||
<br><br> |
|||
By the way, it's totally unsafe to run code from a wiki like this without reading it. |
By the way, it's totally unsafe to run code from a wiki like this without reading it. |
||
<pre> |
<pre> |
||
<nowiki> |
<nowiki> |
||
#!/bin/ |
#!/bin/bash -ex |
||
tgz_url="http://dev.laptop.org/~cscott/xo-debian.tgz" |
tgz_url="http://dev.laptop.org/~cscott/xo-debian.tgz" |
||
Line 32: | Line 42: | ||
chmod a+rx /versions/pristine/debian/etc/rcS.d/S00unfreeze.sh |
chmod a+rx /versions/pristine/debian/etc/rcS.d/S00unfreeze.sh |
||
echo 'tmpfs |
echo 'tmpfs /var/cache/apt/cache tmpfs defaults 0 0' >> /versions/pristine/debian/etc/fstab |
||
cat <<END > /versions/pristine/debian/etc/apt/apt.conf.d/00-tmpfs-cache |
cat <<END > /versions/pristine/debian/etc/apt/apt.conf.d/00-tmpfs-cache |
||
Line 52: | Line 62: | ||
</nowiki> |
</nowiki> |
||
</pre> |
</pre> |
||
* ''Note: After Rebooting you must do the networking part'' |
|||
modprobe usb8xxx |
|||
iwconfig eth0 essid <your-access-point> |
Latest revision as of 22:31, 25 November 2011
The following script, which only follows the instructions on Installing Debian as an upgrade, should install Debian on your XO. Just copy/paste it into a file on the XO, chmod +x, and run. I just tested it, and it worked. YMMV. It will stop midway if there is any error, including in the wget image download.
So in steps:
1. Highlight script below that starts with "#!/bin/bash ex ......." and copy (Ctrl+C)
2. Enter Terminal and become root by typing "su" and return.
3. Make a script file by typing "nano install-script", nano should launch, then
4. Paste the script into nano by clicking on the tab at the top of the Terminal Activity titled "Edit" and click on the right hand icon that has an arrow pointing down (Paste).
5. Exit and Save from nano with Ctrl+X, then selecting "y"
6. Then change the script file into an executable script file by typing: "chmod +x install-script"
7. Execute the script by typing "./install-script" and enter, kick back for awhile and watch it go.(~15 minutes or so? until it finally displays "bash-3.2#" or something ending in "...#"
(However I just ran it and it stopped at line 28, just after "+ chmod a+rx ........unfreeze.sh" perhaps because of excess spaces in the next command line)
(I got same error!)
By the way, it's totally unsafe to run code from a wiki like this without reading it.
#!/bin/bash -ex tgz_url="http://dev.laptop.org/~cscott/xo-debian.tgz" cd /versions/pristine mkdir debian cd debian # wget -O- "$tgz_url" | tar xz wget -q -O- "$tgz_url" | tar xvz cp /etc/{hosts,fstab} /versions/pristine/debian/etc/ cp -r /lib/modules/* /versions/pristine/debian/lib/modules cp -r /lib/firmware/* /versions/pristine/debian/lib/firmware mkdir -p /versions/pristine/debian/{versions,security,var/cache/apt/cache} rm -rf /versions/pristine/debian/boot cp -r /boot /versions/pristine/debian cat <<END > /versions/pristine/debian/etc/rcS.d/S00unfreeze.sh #! /bin/sh mount -t sysfs /sys /sys echo 0 > /sys/devices/platform/dcon/freeze umount /sys END chmod a+rx /versions/pristine/debian/etc/rcS.d/S00unfreeze.sh echo 'tmpfs /var/cache/apt/cache tmpfs defaults 0 0' >> /versions/pristine/debian/etc/fstab cat <<END > /versions/pristine/debian/etc/apt/apt.conf.d/00-tmpfs-cache Dir { Cache "var/cache/apt/" { srcpkgcache "cache/srcpkgcache.bin"; pkgcache "cache/pkgcache.bin"; }; }; END cd /versions/boot rm -rf alt ln -s /versions/pristine/debian alt cp -rl /versions/pristine/debian /versions/run/debian /usr/sbin/setattr -R --iunlink /versions/run/debian echo 'Debian is installed! Reboot and hold down the game key labelled "O"'
- Note: After Rebooting you must do the networking part
modprobe usb8xxx iwconfig eth0 essid <your-access-point>