How to: Ubuntu & Debian debootstrap instalation

Moderators: mdrjr, odroid

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby rockla » Sat Jan 17, 2015 11:46 pm

loboris wrote:
rockla wrote:Cannot increase the partition size.
.
Does having 2 partitions provide better performance , the unpacking packages takes too long for me.

Script works with one or two partitions. You must REBOOT after running fs_resize, then resize2fs command will be executed automaticaly on start.
Number of partitions has no impact on performance.


Actually the script fails here

Code: Select all
sdcard_sect=`fdisk -l $sdcard | grep "Disk $sdcard" | awk '{print $7}'`
if [ "${sdcard_sect}" = "" ]; then
    sdcard_sect=`fdisk -l $sdcard | grep total | awk '{print $8}'`
fi


root@C1:/usr/local/bin# fdisk -l /dev/mmcblk0  | grep /dev/mmcblk0 | grep Linux | awk '{print $8}'

root@C1:/usr/local/bin# fdisk -l /dev/mmcblk0  | grep /dev/mmcblk0 | grep Linux | awk '{print $7}'
Linux


But the image works great the boot time is just 6 seconds.
Code: Select all
[    4.858710] emmc: mmc_rescan_try_freq: trying to init card at 300000 Hz
[    4.897647] aml_emmc_hw_reset 1374
[    5.488034] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    5.589504] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    5.590071] scsi0 : usb-storage 1-1.1:1.0
[    6.588560] scsi 0:0:0:0: Direct-Access     Seagate  FreeAgent GoFlex 0148 PQ: 0 ANSI: 4
[    6.590435] sd 0:0:0:0: [sda] 976773167 512-byte logical blocks: (500 GB/465 GiB)
[    6.591050] sd 0:0:0:0: [sda] Write Protect is off
[    6.591081] sd 0:0:0:0: [sda] Mode Sense: 1c 00 00 00
[    6.592391] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.681665]  sda: sda1 sda2
[    6.684166] sd 0:0:0:0: [sda] Attached SCSI disk
[    7.472648] force enable DISCARD here for ext4 fs
[    7.472687] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[    7.544185] force enable DISCARD here for ext4 fs
[    7.544221] EXT4-fs (sda2): mounting ext3 file system using the ext4 subsystem
[    7.611149] checked enable EXT4 DISCARD here
[    7.611179] EXT4-fs (sda1): mounting with "discard" option, but the device does not support discard
[    7.611203] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    7.615515] checked enable EXT4 DISCARD here
[    7.615546] EXT4-fs (sda2): mounting with "discard" option, but the device does not support discard
[    7.615570] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
rockla
 
Posts: 215
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 18, 2015 1:00 am

ryecoaaron wrote:Any suggestions for this problem?

Code: Select all
SD Card partitions mounted to linux-wheezy & boot-wheezy

DEBOOTSTRAP, FIRST STAGE
OK.
Creating "sources.list"
DEBOOTSTRAP, SECOND-STAGE
/second-stage: line 179: cannot redirect standard input from /dev/null: No such file or directory
please wait \/second-stage: line 163: /bin/sleep: cannot execute binary file
.
ERROR.
*********************
** debootstrap ERROR.
*********************
================================================
ERROR on second-stage, instalation NOT FINISHED.
================================================


I checked the image and /bin/sleep is there and executable. /dev/null is also there.

Maybe your PATH is not set, try to set PATH at the beginning if the second-stage script, so that it looks like:


Code: Select all
#!/bin/bash

# ***************************************
# This is part of "create-sdcard" script
# Do not execute !!
# ***************************************

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby ryecoaaron » Sun Jan 18, 2015 1:12 am

Thanks for the response :)

Path is set
Code: Select all
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin


I guess I will try a fresh installation of Wheezy and try the script again.
ryecoaaron
 
Posts: 98
Joined: Tue Dec 23, 2014 6:02 am
Location: Wisconsin
languages_spoken: english
ODROIDs: odroid-c1 x2, odroid-c2 x1, odroid-xu4 x3, cloudshell xu4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby ryecoaaron » Sun Jan 18, 2015 1:34 am

Working on fresh 32 bit installation of Wheezy. Maybe 64 bit was the problem?

I also had to install dosfstools.
ryecoaaron
 
Posts: 98
Joined: Tue Dec 23, 2014 6:02 am
Location: Wisconsin
languages_spoken: english
ODROIDs: odroid-c1 x2, odroid-c2 x1, odroid-xu4 x3, cloudshell xu4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby rockla » Sun Jan 18, 2015 12:10 pm

+1 for this to be sticky

Just a question why wasn't vi or vim included
rockla
 
Posts: 215
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Mon Jan 19, 2015 6:38 am

Updated. Added scripts to install desktop and mali drivers. Hdmi audio now works.

To rockla: I dont use vi/vim. Shame on me!
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Thu Jan 22, 2015 12:18 am

Updated, some improvements, uses Hardkernel's ubuntu repository...
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby odchab » Thu Jan 22, 2015 5:11 am

Hi,

i´m new with odroid and have only little experience with linux

i´m looking for a Ubuntu or Debian installation with:

multicast support by kernel for a application wich need that

the images i tried did not have that support in the moment


with smcroute -d i get the following

CODE: SELECT ALL
root@odroid-wheezy:~# smcroute -d
INIT: MC-Router IPv4 API already in use; Errno(98): Address already in use
INIT: MC-Router IPv6 API already in use; Errno(98): Address already in use
INIT: Kernel does not support multicast routing; Errno(92): Protocol not available

can you add that support for your installation
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Thu Jan 22, 2015 7:08 am

odchab wrote:Hi,
i´m new with odroid and have only little experience with linux
i´m looking for a Ubuntu or Debian installation with:
multicast support by kernel for a application wich need that
the images i tried did not have that support in the moment

with smcroute -d i get the following
root@odroid-wheezy:~# smcroute -d
INIT: MC-Router IPv4 API already in use; Errno(98): Address already in use
INIT: MC-Router IPv6 API already in use; Errno(98): Address already in use
INIT: Kernel does not support multicast routing; Errno(92): Protocol not available

can you add that support for your installation


I've compiled the kernel with multicast suport, please test it:
Backup your old kernel
Code: Select all
cd /home/odroid
mkdir old-kernel
sudo cp /media/boot/* /home/odroid/old-kernel
or (if running without fat partition)
sudo cp /boot/* /home/odroid/old-kernel

Download and unpack;
Code: Select all
wget http://loboris.eu/test.tar.gz
tar -xzf test.tar.gz

Install kernel:
Code: Select all
cd test
sudo ./kernel_update local /home/odroid/test

reboot

**after reboot your network probably won't work, because udev changed eth0 -> eth1
Code: Select all
sudo nano /etc/udev/rules.d/70-persistent-net.rules
comment line with eth0:
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:06:b3:49:b6", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
change "eth1" in second line to "eth0"
save, reboot...

test smcroute:
Code: Select all
sudo smcroute -k
sudo smbroute -d -v -D
smcroute, Version 0.95, Build 130528
Copyright 2001-2005 Carsten Schill <carsten@cschill.de>
Copyright 2006-2009 Julien Blache <jb@jblache.org>,
                    Todd Hayton <todd.hayton@gmail.com>, and
                    Micha Lenk <micha@debian.org>
Distributed under the GNU GENERAL PUBLIC LICENSE, Version 2 - check GPL.txt

Note: adding VIF, Vif-Ix 0 Fl 0x0000 IP 0x57b2a8c0 eth0
Note: adding MIF, Mif-Ix 0 PHY Ix 2 Fl 0x0 eth0


using pimd:
Code: Select all
root@OdroidC1:~# pimd -q
root@OdroidC1:~# pimd -d
debug level 0xffffffff (dvmrp_detail,dvmrp_prunes,dvmrp_routes,dvmrp_neighbors,dvmrp_timers,igmp_proto,igmp_timers,igmp_members,trace,timeout,packets,interfaces,kernel,cache,rsrr,pim_detail,pim_hello,pim_register,pim_join_prune,pim_bootstrap,pim_asserts,pim_cand_rp,pim_routes,pim_timers,pim_rpf)
22:07:49.592 pimd version 2.1.8 starting
22:07:49.595 Got 262144 byte send buffer size in 0 iterations
22:07:49.595 Got 262144 byte recv buffer size in 0 iterations
22:07:49.596 Got 262144 byte send buffer size in 0 iterations
22:07:49.596 Got 262144 byte recv buffer size in 0 iterations
22:07:49.597 Getting vifs from kernel
22:07:49.597 Installing eth0 (192.168.178.87 on subnet 192.168.178) as vif #0-2 - rate=0
22:07:49.598 Getting vifs from /etc/pimd.conf
22:07:49.598 Local Cand-RP address is 192.168.178.87
22:07:49.599 Local Cand-RP priority is 20
22:07:49.599 Local Cand-RP advertisement period is 30 sec.
22:07:49.599 Local Cand-BSR address is 192.168.178.87
22:07:49.600 Local Cand-BSR priority is 5
22:07:49.600 Adding prefix 224.0.0.0/4
22:07:49.600 data_rate_limit is 50000 (bits/s)
22:07:49.601 data_rate_interval is 20 (seconds)
22:07:49.601 reg_rate_limit is 50000 (bits/s)
22:07:49.601 reg_rate_interval is 20 (seconds)
22:07:49.604 Interface eth0 comes up; vif #0 now in service
22:07:49.605 SENT IGMP Membership Query     from 192.168.178.87  to 224.0.0.1
22:07:49.605 SENT PIM v2 Hello              from 192.168.178.87  to 224.0.0.13
22:07:49.607 Interface register_vif0 comes up; vif #1 now in service

Virtual Interface Table
 Vif  Local-Address    Subnet               Thresh   Flags          Neighbors
   0  192.168.178.87   192.168.178          1        DR NO-NBR     
   1  192.168.178.87   register_vif0        1       

Multicast Routing Table
 Source          Group           RP-addr         Flags
--------------------------(*,*,RP)--------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0

22:07:49.714 create group entry, group 239.255.255.250

Virtual Interface Table
 Vif  Local-Address    Subnet               Thresh   Flags          Neighbors
   0  192.168.178.87   192.168.178          1        DR NO-NBR     
   1  192.168.178.87   register_vif0        1       

Multicast Routing Table
 Source          Group           RP-addr         Flags
--------------------------(*,*,RP)--------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0

22:07:54.717 SENT PIM v2 Bootstrap          from 192.168.178.87  to 224.0.0.13
---------------------------RP-Set----------------------------
Current BSR address: 192.168.178.87
RP-address      Incoming   Group prefix   Priority   Holdtime

22:07:57.679 Cache miss, src 192.168.178.22, dst 239.255.255.250, iif 0
22:07:57.680 create group entry, group 239.255.255.250

Virtual Interface Table
 Vif  Local-Address    Subnet               Thresh   Flags          Neighbors
   0  192.168.178.87   192.168.178          1        DR NO-NBR     
   1  192.168.178.87   register_vif0        1       

Multicast Routing Table
 Source          Group           RP-addr         Flags
--------------------------(*,*,RP)--------------------------
Number of Groups: 0
Number of Cache MIRRORs: 0
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby odchab » Thu Jan 22, 2015 5:58 pm

Thank you for your quick answer

hopefully my english is good enough :oops:

in the moment i use a U3 with the "offical" Odroid Debian Wheezy Image debian-wheezy-lxde-odroid-u-20140910.img
and i removed lxde - i don't need that

as i undestood

if have to use a C1 with one of your Installation - which one?
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Thu Jan 22, 2015 6:58 pm

odchab wrote:.....
if have to use a C1 with one of your Installation - which one?

Anyone, I suggest one of the minimal images from Mega: https://mega.co.nz/#F!JZ4m2CxQ!EvCssjkJofsecGMuXGOJxg
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby odchab » Thu Jan 22, 2015 11:33 pm

the images from Mega are for C1? or can i use them on U3 too?
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Thu Jan 22, 2015 11:38 pm

odchab wrote:the images from Mega are for C1? or can i use them on U3 too?

Only for C1 !
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby odchab » Thu Jan 22, 2015 11:49 pm

ok - so i have first pick up a C1
then i come back here ;-)
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Fri Jan 23, 2015 6:02 am

Nice work! Will you add a script to install kodi? :D
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Fri Jan 23, 2015 6:29 am

Technikfreak2002 wrote:Nice work! Will you add a script to install kodi? :D

Images created with last script version have Hardkernels's repositoriy in apt sources.
If you install desktop, you can easy install kodi with
Code: Select all
sudo apt-get install kodi

Hardkernel's kodi package does not include dependencies ( :?: :!: ) and it will not work, but you can install and then remove xbmc, and necessary dependencies will be installed:
Code: Select all
sudo apt-get install xbmc
sudo apt-get remove --purge xbmc
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby mdrjr » Fri Jan 23, 2015 9:37 am

Opps.. I'll add the dependencies to the package :(
mdrjr
Site Admin
 
Posts: 11681
Joined: Fri Feb 22, 2013 11:34 pm
Location: Brazil
languages_spoken: english, portuguese
ODROIDs: -

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sun Jan 25, 2015 7:59 am

i've installed kodi in the way you described. but it is still unuseable. i got only 10FPS in the gui. i can't play any video. some videos start playing, but only at 6 to 10 FPS. h264 vidos won't play at all. i only hear the sound.
i am wondering about how hardkernel got this to work. maybe they can tell us....
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 25, 2015 8:15 am

Technikfreak2002 wrote:i've installed kodi in the way you described. but it is still unuseable. i got only 10FPS in the gui. i can't play any video. some videos start playing, but only at 6 to 10 FPS. h264 vidos won't play at all. i only hear the sound.
i am wondering about how hardkernel got this to work. maybe they can tell us....

Kodi works poorly in Hardkernel's image too.
I don't see much point in using the development board such as Odroid-C1 as a Linux media center anyhow. It will newer work as good as Android.
I've created dualboot instalation (http://forum.odroid.com/viewtopic.php?f=112&t=8740) and for watching videos I'm using Android.
Kodi, MX Player and other media stuff works quite good in Android.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sun Jan 25, 2015 9:10 am

yes i know. and you are right. it is a devolpment board.

ok enough off topic :) your scrips are really good and helped me a lot building an small desktop/media-server.

Thank you for that! and keep on working!
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby 0n3man » Sun Jan 25, 2015 10:45 am

This is a great script, however I wanted to let you know when I tried to run it today on a ubuntu 14.04 system it failed pulling back the kernel package. The log had the message "There are problems and -y was used without --force-yes. So I simply added --force-yes after -y on the line "apt-get -y -q install linux-image-c1 mali-fbdev >> $_LOGFILE 2>&1" in the second-stage script. Without this fix the image file was created without a kernel. When the script finishes it failes to unmount the partition. The issue is that ntp is running inside the mounted partition. I haven't figured out how to fix that yet. This leave the .img1 file mounted. If you kill the ntp process you can then unmount the .img1 file.
0n3man
 
Posts: 16
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby 0n3man » Sun Jan 25, 2015 11:50 am

When I boot from the image created by this script I get some locale warning like this "/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)". I fix the issue by running this command "sudo locale-gen en_US.UTF-8". Is there some configuration in the script that would prevent this from happening or is there some way to add a line such as this to the image build script?
0n3man
 
Posts: 16
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sun Jan 25, 2015 5:59 pm

What is the function of c1_init.sh? Do i have to run it?
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 25, 2015 7:18 pm

0n3man wrote:This is a great script, however I wanted to let you know when I tried to run it today on a ubuntu 14.04 system it failed pulling back the kernel package. The log had the message "There are problems and -y was used without --force-yes. So I simply added --force-yes after -y on the line "apt-get -y -q install linux-image-c1 mali-fbdev >> $_LOGFILE 2>&1" in the second-stage script. Without this fix the image file was created without a kernel. When the script finishes it failes to unmount the partition. The issue is that ntp is running inside the mounted partition. I haven't figured out how to fix that yet. This leave the .img1 file mounted. If you kill the ntp process you can then unmount the .img1 file.
.
.
When I boot from the image created by this script I get some locale warning like this "/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)". I fix the issue by running this command "sudo locale-gen en_US.UTF-8". Is there some configuration in the script that would prevent this from happening or is there some way to add a line such as this to the image build script?

Thank you for informing about issues. I just tried to build the trusty image (to image fille) and got no errors. I'm running on Ubuntu 14.10.
You can try to run the script with option to build into local directory, not directly into the image file, to avoid mount problem (create_odroid_image -> image_name="") and run "image_from_dir" later to create the image.
I suggest to run htop in separate terminal to watch the process. All processes during execution of "second_stage" script are run under "qemu-user-static", so you can filter them (F4). Use tree view (F6).
Concerning locale warning, you can try to set locale and timezone explicitly in "second_stage" parameters (uncomment necessary and set desired language and time zone)
Code: Select all
# Set timezone, for default set   _timezone=""
#_timezone="Etc/UTC"
_timezone=""

# IF YOU WANT TO INSTALL THE LANGUAGE DIFFERENT THEN THE HOST's:
# COMMENT FOR DEFAULT
#LANGUAGE="en"
#LANG="en_US.UTF-8"
# *****************************************************************
Last edited by loboris on Sun Jan 25, 2015 7:40 pm, edited 1 time in total.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 25, 2015 7:38 pm

Technikfreak2002 wrote:What is the function of c1_init.sh? Do i have to run it?

"c1_init.sh" is the script from Hardkernel's "boot.ini" package. It should be placed into /etc/initramfs-tools/scripts/local-top/ directory, to be included into initramfs (uInitrd) and executed early. I had some problem with it in some distros, so I included it into /usr/local/bin.
It sets some video parameters, unblanks framebuffer console early, so you can see boot messages on screen, sets some nettwork parameters...
You can execute it manualy, if all is ok, execute it from /etc/rc.local or copy it to /etc/initramfs-tools/scripts/local-top/ and rebuild initramfs
Code: Select all
update-initramfs -u -k `uname -r`

If you put it into initramfs, comment (or delete) "echo 0 > /sys/devices/platform/mesonfb/graphics/fb1/blank" from rc.local.
You can also put "echo 1728000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" into rc.local to get max cpu frequency of 1.728 GHz.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sun Jan 25, 2015 8:19 pm

Can you explain me, how to integrate it into image building process?
Thanks!

EDIT:

i placed this lines:
Code: Select all
mkdir -p $odir/etc/initramfs-tools/scripts/local-top/
cp c1_init.sh $odir/etc/initramfs-tools/scripts/local-top/

before executeing second-stage (the qemu part) that should work i think.
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby 0n3man » Sun Jan 25, 2015 9:39 pm

Following up, I did have the following set in second_stage
_timezone="America/New_York"

Will try the build into local directory option

Thanks
0n3man
 
Posts: 16
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 25, 2015 9:52 pm

Technikfreak2002 wrote:Can you explain me, how to integrate it into image building process?
Thanks!

EDIT:

i placed this lines:
Code: Select all
mkdir -p $odir/etc/initramfs-tools/scripts/local-top/
cp c1_init.sh $odir/etc/initramfs-tools/scripts/local-top/

before executeing second-stage (the qemu part) that should work i think.

Yes. You should see the kernel messages before login screen.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby 0n3man » Sun Jan 25, 2015 10:38 pm

Is there anyway to get boot messages and then console out to either HDMI or maybe over the mini USB port with the images built with this script?
0n3man
 
Posts: 16
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Sun Jan 25, 2015 10:54 pm

0n3man wrote:Is there anyway to get boot messages and then console out to either HDMI or maybe over the mini USB port with the images built with this script?

You will allways get concole on HDMI. You get full u-boot and kernel messages over uart. You can get partial kernel messages on HDMI, see previous reply.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby 0n3man » Mon Jan 26, 2015 5:10 am

Had bad hdmi cable ... do get console to HDMI now. I tried changes to get some messges to HDMI on boot. I boot image, commented out the echo line from rc.local, copied c1_init.sh to /etc/initramfs-tools/scripts/local-top/ and rebuild initramfs. Upon reboot no console on HDMI. If I then run the c1_init.sh console comes up. Any suggestion?
0n3man
 
Posts: 16
Joined: Sat Jan 17, 2015 8:34 am
languages_spoken: english
ODROIDs: U3 & C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Mon Jan 26, 2015 5:15 am

loboris wrote:
Technikfreak2002 wrote:Can you explain me, how to integrate it into image building process?
Thanks!

EDIT:

i placed this lines:
Code: Select all
mkdir -p $odir/etc/initramfs-tools/scripts/local-top/
cp c1_init.sh $odir/etc/initramfs-tools/scripts/local-top/

before executeing second-stage (the qemu part) that should work i think.

Yes. You should see the kernel messages before login screen.


It works! Thanks!
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby lcars » Tue Jan 27, 2015 8:25 am

First off let me say thank you loboris, your minimal installation worked great. But there is something I don't understand and maybe someone can help. I have 6 C1 boards and they will all be running the same configuration. So after creating the sd card image from the installation tar, I booted and added a few more services so that I could run Java 8 and Tomcat. So far no problems. I then made a backup of the sd card with "dd" and using that cloned a second sd card. Now both sd cards boot fine on the original C1. But if I move either of the cards to any of the other C1 boards it won't boot. This makes no sense to me. Both cards boot on the original C1, neither boot on any other C1.

Anyone have any thoughts?
lcars
 
Posts: 13
Joined: Sat Jan 03, 2015 8:43 am
languages_spoken: english
ODROIDs: C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby lcars » Tue Jan 27, 2015 10:45 am

This minimum installation has the same duplicate MAC address bug as detailed in viewtopic.php?f=117&t=8293&p=65878&e=65878, since it started out as the desktop version this make sense. But unfortunately the patch that fixed the desktop version doesn't seem to work here. So I may have to start over again with the full desktop version.
lcars
 
Posts: 13
Joined: Sat Jan 03, 2015 8:43 am
languages_spoken: english
ODROIDs: C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Tue Jan 27, 2015 6:00 pm

lcars wrote:This minimum installation has the same duplicate MAC address bug as detailed in viewtopic.php?f=117&t=8293&p=65878&e=65878, since it started out as the desktop version this make sense. But unfortunately the patch that fixed the desktop version doesn't seem to work here. So I may have to start over again with the full desktop version.

MAC address has nothing to do with ubuntu/debian instalation.
And you can easy change it with macchanger (see http://www.ubuntuka.com/change-mac-hardware-address-ubuntu/).
Easiest way to change it on every boot is to add
Code: Select all
auto eth0
iface eth0 inet dhcp
hwaddress ether AA:BB:CC:11:22:33 (replace AA:BB:CC:11:22:33 with any MAC address)
to /etc/network/interfaces. It works.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Sat Jan 31, 2015 6:03 am

:!: Updated, more options.
install_desktop script now installs fully functional Lubuntu desktop on Ubuntu trusty/utopic, with great working kodi,
on Debian jessie you can install LXDE desktop, without kodi.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sat Jan 31, 2015 7:56 pm

Agian nice work! Thank you! Creating a new image at the moment :)

Will kodi also work, if i replace lubuntu-core with xubuntu-core? I'm not shure, because you use metacity in this script and some lubuntu specific changes in configuration.
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Sat Jan 31, 2015 10:09 pm

Kodi works in xubuntu, but only if you don't use compositing in wich case windows dragging is extremely slow. You can try. You can install lubuntu and xubuntu together and choose at login.
New kodi package installs all dependencies, so it is not necessary to install xbmc anymore. I've updated the script.
If you need office tools, you can install calligra instead of libre office, it works great. Install also systemsettings to be able to adjust qt4 colors.
I recommend testing on usb HD. Installation is very fast so you can test different options quickly.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sat Jan 31, 2015 10:31 pm

Great thank you!

Maybe you could add the -l option to umount to force unmounting partitions. I know its a little bit dangeruos, but for me it works so far.
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby freestylemaster » Sun Feb 01, 2015 1:39 am

Thanks a lot for your work!

I've just downloaded the jessie-minimal and flashed it but it does not contain hardkernel repository. How do I add it to sources?


Edited for correction.
freestylemaster
 
Posts: 29
Joined: Thu Jan 22, 2015 11:10 pm
languages_spoken: english
ODROIDs: C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Sun Feb 01, 2015 3:34 am

freestylemaster wrote:I've just downloaded the jessie-minimal and flashed it but it does not contain hardkernel repository. How do I add it to sources?

Images on Mega are old, please create the image with new script version.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Sun Feb 01, 2015 3:37 am

New kodi version can not be instaled on Ubuntu-utopic. :!:
I've updated the install_desktop script to install older kodi version on utopic.

Solved: as of 2015-02-05 kodi from harkernel's repository can be installed in utopic.
Last edited by loboris on Thu Feb 05, 2015 8:27 am, edited 1 time in total.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby Technikfreak2002 » Sun Feb 01, 2015 10:53 pm

Hello loboris!
With you new script i always got the error "uinitrd not created".
The file is placed in /media/boot instead of /boot.
i tried fat and nofat option.
could you test this?
Thanks!
Technikfreak2002
 
Posts: 29
Joined: Sun Dec 14, 2014 10:13 pm
languages_spoken: german, english (really bad)
ODROIDs: ODROID-C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Mon Feb 02, 2015 5:48 am

Technikfreak2002 wrote:Hello loboris!
With you new script i always got the error "uinitrd not created".
...
Thanks!

I've corected the problem.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Mon Feb 02, 2015 5:52 am

:!: Updated, some optimization.
Added option to create btrfs formated linux partition with compression enabled.
Takes ~30-40% less sd card space.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Tue Feb 03, 2015 12:34 am

:!: Updated. More optimization.
Added script install_mini_desktop:
Installs fully functional LXDE desktop without multimedia.
Adds less than 300MB to basic image, total less than 800MB on sd card.
Can be installed on every distribution.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby odchab » Wed Feb 04, 2015 7:35 am

odchab wrote:ok - so i have first pick up a C1
then i come back here ;-)


i´m back :D

C1 is running
Kernel - installed

during installation of libmysqlclient18 i get the following Error

Code: Select all
root@OdroidC1:~# sudo aptitude install libmysqlclient18
Die folgenden teilweise installierten Pakete werden konfiguriert:
  smcroute
Es werden keine Pakete installiert, aktualisiert oder entfernt.
0 Pakete aktualisiert, 0 zusätzlich installiert, 0 werden entfernt und 0 nicht aktualisiert.
0 B an Archiven müssen heruntergeladen werden. Nach dem Entpacken werden 0 B zusätzlich belegt sein.
smcroute (0.95-1+deb7u1) wird eingerichtet ...     
Starting static multicast router daemon: invoke-rc.d: initscript smcroute, action "start" failed.
dpkg: Fehler beim Bearbeiten von smcroute (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 smcroute
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ein Paket konnte nicht installiert werden. Versuch, dies zu lösen:
smcroute (0.95-1+deb7u1) wird eingerichtet ...
Starting static multicast router daemon: invoke-rc.d: initscript smcroute, action "start" failed.
dpkg: Fehler beim Bearbeiten von smcroute (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Fehler traten auf beim Bearbeiten von:
 smcroute
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu/Debian minimal debootstrap instalation

Unread postby loboris » Wed Feb 04, 2015 6:54 pm

odchab wrote:...
C1 is running
Kernel - installed
during installation of libmysqlclient18 i get the following Error
...

Images on "Mega" are quite old. I could build you the new image with multicast kernel included. Just tell me witch distribution you want.
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby odchab » Wed Feb 04, 2015 10:11 pm

Hi,

the programm i want to use is running "normally" on raspi with debian wheezy - so it looks for me the best is to use the same
odchab
 
Posts: 12
Joined: Thu Aug 14, 2014 8:10 pm
languages_spoken: german, english
ODROIDs: U3,C1

Re: Ubuntu & Debian minimal debootstrap instalation

Unread postby loboris » Thu Feb 05, 2015 1:28 am

odchab wrote:Hi,

the programm i want to use is running "normally" on raspi with debian wheezy - so it looks for me the best is to use the same

I've tested as follows:
- installed fresh ubuntu utopic minimal installation (created with my script) on sd card
- booted odroid
- replaced uImage in /media/boot with multicast kernel (from "test.tar.gz")
- copied /lib/modules/3.10.64 from "test.tar.gz" to /lib/modules
- rebooted
- installed smcroute, net-tools and iperf
- on two machines on the same LAN (first Ubuntu 14.10, second Debian wheezy) started iperf as listener
- on odroid started iperf as sender
- odroid is sending packets, clients are receiving simultaneously
I think multicasting is working without problem (I don't think there sould be any problem in odroid-wheezy instalation)

Code: Select all
boris@Kubuntu$ iperf -s -u -B 224.1.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.1.1.1
Joining multicast group  224.1.1.1
Receiving 1470 byte datagrams
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 224.1.1.1 port 5001 connected with 192.168.178.87 port 52890
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  3]  0.0- 1.0 sec   126 KBytes  1.03 Mbits/sec   0.058 ms    1/   89 (1.1%)
[  3]  1.0- 2.0 sec   126 KBytes  1.03 Mbits/sec   0.184 ms    1/   89 (1.1%)
[  3]  2.0- 3.0 sec   126 KBytes  1.03 Mbits/sec   0.099 ms    1/   89 (1.1%)
[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec   0.111 ms    0/   89 (0%)
[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec   0.164 ms    0/   89 (0%)
[  3]  0.0- 5.0 sec   637 KBytes  1.04 Mbits/sec   0.207 ms    3/  447 (0.67%)

Code: Select all
boris@debian:~$ sudo iperf -s -u -B 224.1.1.1 -i 1
------------------------------------------------------------
Server listening on UDP port 5001
Binding to local address 224.1.1.1
Joining multicast group  224.1.1.1
Receiving 1470 byte datagrams                                                                       
UDP buffer size:  224 KByte (default)                                                               
------------------------------------------------------------                                         
[  3] local 224.1.1.1 port 5001 connected with 192.168.178.87 port 52890                             
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams                     
[  3]  0.0- 1.0 sec   126 KBytes  1.03 Mbits/sec   0.131 ms    1/   89 (1.1%)                       
[  3]  1.0- 2.0 sec   126 KBytes  1.03 Mbits/sec   0.251 ms    1/   89 (1.1%)                       
[  3]  2.0- 3.0 sec   126 KBytes  1.03 Mbits/sec   0.152 ms    1/   89 (1.1%)                       
[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec   0.164 ms    0/   89 (0%)                         
[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec   0.200 ms    0/   89 (0%)                         
[  3]  0.0- 5.0 sec   637 KBytes  1.04 Mbits/sec   0.233 ms    3/  447 (0.67%)

Code: Select all
odroid@OdroidC1:~$ sudo iperf -c 224.1.1.1 -u -T 32 -t 5 -i 1
------------------------------------------------------------
Client connecting to 224.1.1.1, UDP port 5001
Sending 1470 byte datagrams
Setting multicast TTL to 32
UDP buffer size:  502 KByte (default)
------------------------------------------------------------
[  3] local 192.168.178.87 port 52890 connected with 224.1.1.1 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec   129 KBytes  1.06 Mbits/sec
[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec
[  3]  0.0- 5.0 sec   642 KBytes  1.05 Mbits/sec
[  3] Sent 447 datagrams
loboris
 
Posts: 161
Joined: Sat Jan 03, 2015 12:07 am
languages_spoken: english
ODROIDs: C1, XU4

PreviousNext

Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 1 guest