Slackware On Odroid U3: Difference between revisions
(Slackware 14.2 On Odroid U3) |
No edit summary |
||
Line 5: | Line 5: | ||
In 3 partition method, installer root , like from the initrd image, is installed onto second par | 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 | tion, and booted to install the distribution to a third partition. You may refer | ||
to multiboot document ( [https://github.com/gv1/Odroid.U3/blob/master/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. | to multiboot document ( [https://github.com/gv1/Odroid.U3/blob/master/multiboot/README 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 [https://github.com/gv1/Odroid.U3/tree/master/multiboot] for a two partition method. | See the multiboot page at github [https://github.com/gv1/Odroid.U3/tree/master/multiboot Multiboot] for a two partition method. | ||
Ref: | Ref: | ||
# [https://github.com/gv1/Odroid.U3] | # [https://github.com/gv1/Odroid.U3 Odroid U3 related pages, from Gv] | ||
Line 20: | Line 19: | ||
==== A working Ubuntu image like ubuntu-16.04.1.lts ==== | ==== A working Ubuntu image like ubuntu-16.04.1.lts ==== | ||
[http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz] | [http://dn.odroid.com/4412/Linux/ubuntu_16.04lts/ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz] | ||
==== Slackware 14.2 for arm ==== | ==== Slackware 14.2 for arm ==== | ||
[http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2] | [http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2 Slackwarearm-14.2]] | ||
rsync --exclude '*/source/*' --exclude '*/testing/*' -Pavv --delete ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2. | rsync --exclude '*/source/*' --exclude '*/testing/*' -Pavv --delete ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2. | ||
=== Installation === | === Installation === | ||
Line 31: | Line 30: | ||
==== Install the u-boot header and FAT partiotion for zIamge, uInitrd and boot.ini ==== | ==== 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 | |||
xzcat --verbose ubuntu-16.04-mate-odroid-u2u3-20160920.img.xz | dd of=/dev/sdX count=300000 | |||
==== Create partitions on SD card ==== | ==== Create partitions on SD card ==== | ||
First partion created from the image has size of ~128MB. | fdisk /dev/sdX | ||
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. | |||
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 [https://github.com/gv1/Odroid.U3/tree/master/u-boot-stable 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 [https://github.com/gv1/Odroid.U3/tree/master/u-boot-stable u-boot-stable] directory for more info. | |||
==== Mount partition two, install 14.2 setup initrd image, copy kernel modules, firmware and installation sources. ==== | ==== Mount partition two, install 14.2 setup initrd image, copy kernel modules, firmware and installation sources. ==== | ||
Line 55: | Line 62: | ||
From PC host / Odroid running other Linux | From PC host / Odroid running other Linux | ||
mkdir odroid | |||
mkdir odroid | cd ordoid | ||
cd ordoid | mkdir boot | ||
mkdir boot | mkdir root | ||
mkdir root | mkfs.ext4 /dev/sdX2 | ||
mkfs.ext4 /dev/sdX2 | tune2fs /dev/sdX2 -L installer | ||
tune2fs /dev/sdX2 -L installer | mount /dev/sdX2 boot | ||
mount /dev/sdX2 boot | |||
# copy / download distribution files, say slackwarearm-14.2 to boot/ | # copy / download distribution files, say slackwarearm-14.2 to boot/ | ||
mkdir boot/slackwarearm-14.2 | wget http://www.arm.slackware.com/slackwarearm/slackwarearm-14.2/isolinux/initrd-armv7.img | ||
cd boot/slackwarearm-14.2 | mkdir boot/slackwarearm-14.2 | ||
cd boot/slackwarearm-14.2 | |||
For downloading: | For downloading: | ||
Refer to http://arm.slackware.com and also consider donations. | Refer to http://arm.slackware.com and also consider donations. | ||
cd boot | rsync --exclude '*/source/*' --exclude '*/testing/*' -Pavv --delete ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2 . | ||
gzip -dc ../slackwarearm-14.2/isolinux/initrd-armv7.img | cpio -i --make-directories | cd ../.. | ||
sync | |||
cd lib | Preparing the installer root partition: | ||
rm -rf modules/* | |||
rm -rf firmware/* | cd boot | ||
# mount and copy from Ubuntu. | 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. ==== | ==== Install ubuntu on third partition, copy module and firmware files to installer partition. ==== | ||
mkdir ubuntu | mkdir ubuntu | ||
if you have the image installed onto an sd card, use the second partition from there. | if you have the image installed onto an sd card, use the second partition from there. | ||
mount -r /dev/sdY2 ubuntu | mount -r /dev/sdY2 ubuntu | ||
Or | |||
parted -s ubuntu-16.04-mate-odroid-u2u3-20160920.img unit B print | If you only have the image | ||
find partition 2 start offset from the output. | |||
p2offset=.... | First | ||
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 | 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. ==== | ==== Reboot odroid, and if everything goes fine, will boot into slackware installer. ==== | ||
Line 124: | Line 146: | ||
press enter to login as root | press enter to login as root | ||
run setup: | run setup: | ||
setup | |||
During installation, | During installation, | ||
Choose partition 3 as target, and dont' format it. It already has Ubuntu on it. | Choose partition 3 as target, and dont' format it. It already has Ubuntu on it. | ||
Line 131: | Line 153: | ||
==== Modify boot.ini and reboot. ==== | ==== Modify boot.ini and reboot. ==== | ||
mount /dev/sdX1 boot | mount /dev/sdX1 boot | ||
edit and modify boot/boot.ini to boot from parition 3 | edit and modify boot/boot.ini to boot from parition 3 | ||
setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p3 | setenv bootargs "console=tty1 console=ttySAC1,115200n8 root=/dev/mmcblk0p3 rootwait ro mem=2047M ${videoconfig}" | ||
sync | |||
sync | umount boot | ||
umount boot | |||
==== If you are planning for multiboot ==== | ==== If you are planning for multiboot ==== | ||
cd root | |||
cd root | mv * slackware-14.2 | ||
mv * slackware-14.2 | mv slackware-14.2/ubuntu-16.04.1.lts . | ||
mv slackware-14.2/ubuntu-16.04.1.lts . | |||
Now you have both Slackware and Ubuntu on same partition. | Now you have both Slackware and Ubuntu on same partition. | ||
See | See [https://github.com/gv1/Odroid.U3/tree/master/multiboot 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. | ||
this time, you need to enter the number corresponding to the distro at a prompt. | |||
=== Other info === | === Other info === | ||
Line 160: | Line 179: | ||
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. | 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. | ||
#[http://www.dillo.org Dillo] version 3.0.5 ( fast , but premitive ) first step | |||
#[https://archive.mozilla.org/pub/PROJECT/releases/RELEASE/source/ Mozilla Firefox] 50.0 ( compile from source, took long time like more than 6 hours) | |||
[https://github.com/gv1/Odroid.U3/blob/master/firefox-50.0.tar.xz firefox-50.0.tar.xz] | |||
=== No libreoffice.=== | |||
Office compilation - fail | Office compilation - fail | ||
Libreoffice libreoffice-5.2.2.2 compiled, ( took very long time, 12 ho | Libreoffice libreoffice-5.2.2.2 compiled, ( took very long time, 12 ho | ||
Line 181: | Line 198: | ||
But no other issues on reboot after shutdown. This gets fixed with | But no other issues on reboot after shutdown. This gets fixed with | ||
[https://github.com/gv1/Odroid.U3/tree/master/linux-4.8.y] | [https://github.com/gv1/Odroid.U3/tree/master/linux-4.8.y linux-4.8.y] | ||
[https://github.com/gv1/Odroid.U3/tree/master/u-boot-stable] | [https://github.com/gv1/Odroid.U3/tree/master/u-boot-stable u-boot-stable] |
Revision as of 17:16, 16 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
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