Slackware On Odroid U3: Difference between revisions
No edit summary |
mNo edit summary |
||
Line 34: | Line 34: | ||
xzcat --verbose ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=/dev/sdX count=300000 | xzcat --verbose ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=/dev/sdX count=300000 | ||
Here is some info on how to download just enough data from site: | |||
wget -qO- http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | xzcat | dd of=x.img count=1 | |||
file x.img | |||
# rm x.img | |||
from | |||
x.img: DOS/MBR boot sector; partition 1 : ID=0x6, start-CHS (0x0,97,34), end-CHS (0x10,178,34), startsector 6144, 262144 sectors; partition 2 : ID=0x83, start-CHS (0x60,0,1), end-CHS (0x24e,94,16), startsector 268288, 9216000 sectors | |||
# wget -qO- http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | xzcat | dd of=ubuntu-16.04-mate-odroid-u2u3-20160920.img count=$((6144+262144)) | |||
This is more useful when you want to download just partition one, not the entire distribution. | |||
==== Create partitions on SD card ==== | ==== Create partitions on SD card ==== |
Latest revision as of 08:50, 17 November 2016
Slackware 14.2 On Odroid U3
3+ partition method
In 3 partition method, installer root , like from the initrd image, is installed onto second par tion, and booted to install the distribution to a third partition. You may refer to multiboot document ( Multiboot README ) to do a two partition method of installation. It is a bit more complicated than three partition method. This method can further be simplified to do installation into a single partition, provided a suitable u-boot firmware is fused.
See the multiboot page at github Multiboot for a two partition method.
Ref:
Requirements
16/32 GB Micro SD card
You may also install on to a pen drive or external hard disk for usb and boot from there. But you still will require a micro sd card for booting.
A working Ubuntu image like ubuntu-16.04.1.lts
ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz
Slackware 14.2 for arm
rsync --exclude '*/source/*' --exclude '*/testing/*' -Pavv --delete ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2.
Installation
Install the u-boot header and FAT partiotion for zIamge, uInitrd and boot.ini
Method one, using Ubuntu 16.04 boot files
xzcat --verbose ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=/dev/sdX count=300000
Here is some info on how to download just enough data from site:
wget -qO- http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | xzcat | dd of=x.img count=1 file x.img # rm x.img
from
x.img: DOS/MBR boot sector; partition 1 : ID=0x6, start-CHS (0x0,97,34), end-CHS (0x10,178,34), startsector 6144, 262144 sectors; partition 2 : ID=0x83, start-CHS (0x60,0,1), end-CHS (0x24e,94,16), startsector 268288, 9216000 sectors
# wget -qO- http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | xzcat | dd of=ubuntu-16.04-mate-odroid-u2u3-20160920.img count=$((6144+262144)) This is more useful when you want to download just partition one, not the entire distribution.
Create partitions on SD card
fdisk /dev/sdX
From partition created by dd from img in step 1, delete second and add three more ( or as many desired ).
First partion created from the image has size of ~128MB. Make this partition bootable ( Boot flag on ), if not already so. Size of second partion should hold the installer initrd ( uncompressed ) and also the distribution (slackware) for installation, something like 4GB. Third partition is where the distributions are installed. Size in the order of 24GB or so. Fourth is the swap partion - 2GB or so.
Device Boot Start End Sectors Size Id Type /dev/sdX1 * 6144 268287 262144 128M 6 FAT16 /dev/sdX2 268288 8656895 8388608 4G 83 Linux /dev/sdX3 8656896 58988543 50331648 24G 83 Linux /dev/sdX4 58988544 62945279 3956736 1.9G 82 Linux swap
Method 2, using u-boot files
See u-boot Parition the card like as in first method, manually. Next make the card u-boot capable by fusing the required firmware. Use sd_fusing_all.sh to fuse required U-Boot files on to sd card. See u-boot-stable directory for more info.
Mount partition two, install 14.2 setup initrd image, copy kernel modules, firmware and installation sources.
From PC host / Odroid running other Linux
mkdir odroid cd ordoid mkdir boot mkdir root mkfs.ext4 /dev/sdX2 tune2fs /dev/sdX2 -L installer mount /dev/sdX2 boot
- copy / download distribution files, say slackwarearm-14.2 to boot/
wget http://www.arm.slackware.com/slackwarearm/slackwarearm-14.2/isolinux/initrd-armv7.img mkdir boot/slackwarearm-14.2 cd boot/slackwarearm-14.2
For downloading: Refer to http://arm.slackware.com and also consider donations.
rsync --exclude '*/source/*' --exclude '*/testing/*' -Pavv --delete ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2 . cd ../..
Preparing the installer root partition:
cd boot gzip -dc ../slackwarearm-14.2/isolinux/initrd-armv7.img | cpio -i --make-directories sync cd lib rm -rf modules/* rm -rf firmware/* # mount and copy from Ubuntu.
Install ubuntu on third partition, copy module and firmware files to installer partition.
mkdir ubuntu
if you have the image installed onto an sd card, use the second partition from there.
mount -r /dev/sdY2 ubuntu
Or If you only have the image
First
unxz ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz ) parted -s ubuntu-16.04-mate-odroid-u2u3-20160920.img unit B print find partition 2 start offset from the output. p2offset=.... mount second partition from ubuntu-16.04-mate-odroid-u2u3-20160920.img - mount -o loop,ro,offset=$p2offset ubuntu-16.04-mate-odroid-u2u3-20160920.img ubuntu
Or
# find info about partitions xzcat ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=x.img count=1 file x.img # rm x.img xzcat ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=ubuntu-16.04-mate-odroid-u2u3-20160920.img count=9216000 skip=268288 mount -o loop ubuntu-16.04-mate-odroid-u2u3-20160920.img ubuntu
mkfs.ext4 /dev/sdX3 tune2fs /dev/sdX3 -L slackware14.2 mount /dev/sdX3 root mkdir root/ubuntu-16.04.1.lts mkdir root/installer mkdir root/slackware-14.2 (cd ubuntu; tar cfz - *) | (cd root/ubuntu-16.04.1.lts; tar xfz - ) # copy modules and firmware? to installer. (cd root/ubuntu-16.04.1.lts/lib/ ; tar cfz - modules firmware ) | (cd boot/lib/; tar xfz - ) sync sync umount ubuntu umount boot umount root
Reboot odroid, and if everything goes fine, will boot into slackware installer.
press enter to login as root run setup:
setup
During installation, Choose partition 3 as target, and dont' format it. It already has Ubuntu on it. Choose source directory for installation - /slackwarearm-14.2/slackware Proceed with the normal slackware installation.
Modify boot.ini and reboot.
mount /dev/sdX1 boot edit and modify boot/boot.ini to boot from parition 3 setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p3 rootwait ro mem=2047M ${videoconfig}" sync umount boot
If you are planning for multiboot
cd root mv * slackware-14.2 mv slackware-14.2/ubuntu-16.04.1.lts .
Now you have both Slackware and Ubuntu on same partition. See multiboot to see how to get a multiboot setup ( choose distribution at boot time ) so that you can choose the distribution at boot time. No fancy chooser this time, you need to enter the number corresponding to the distro at a prompt.
Other info
Mouse pointer issue.
Xorg ( with blackbox wm ) seems have no mouse curser until you open an xterm or s
o by clicking the right mouse button. Mouse pointer is okay if you have an .xinitrc that starts an xterm or so.
No web browsers.
Browsers you can compile and run on odroid u3, slackware 14.2: sadly none of these browsers are available in the distribution. text based ones like lynx are there. Emacs supports web browsing mode too.
- Dillo version 3.0.5 ( fast , but premitive ) first step
- Mozilla Firefox 50.0 ( compile from source, took long time like more than 6 hours)
No libreoffice.
Office compilation - fail Libreoffice libreoffice-5.2.2.2 compiled, ( took very long time, 12 ho
urs or more ) starts, but fall into libreoffice docuement discovery mode and fail (repeat):
(soffice:1091): Gtk-WARNING **: Theme parsing error: :1:59: 'min-width' is not a va lid property name
(soffice:1091): Gtk-WARNING **: Theme parsing error: :1:76: 'min-height' is not a v alid property name
Shutdown seems not shutdown/poweroff complete, but keeps printing message, should not hav e reached here.
But no other issues on reboot after shutdown. This gets fixed with linux-4.8.y u-boot-stable