Bare naked Ubuntu [update 2/1]

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Bare naked Ubuntu [update 2/1]

Postby dylandn » Thu Jan 31, 2013 6:12 pm

First of all, full credit to deadhp1 for providing the original Ubuntu 11.10 image on which this is based.

This is an "enhanced" version of the stock Ubuntu image, but my definition of enhanced probably doesn't mean what you think it means.
My goal is to create a minimal system similar to what you would get if you installed the Ubuntu Minimal CD. It will boot to text, has apt-get, and that's it. Everything else has been purged. Use it as a bare naked base system on which you can add exactly and only what you want. I come from a Gentoo background and prefer my systems lean and mean. This image will fit on a 1G card with ~340megs to spare. Install with dd. I use a DM9601 usb-Ethernet adapter so I haven't tested wifi but iwconfig and wpasupplicant are there.

Some things I've noticed:
- The loadavg is always 4 at a minimum, even at idle. This really should be 0 but I have no idea what's keeping it up.
[edit] This seems to have calmed down a bit. It still hovers between 3 and 4. still weird.
- cron in the stock image was always spiking the cpu for 100% for no apparant reason. (it's purged in this image)
- fbset is weird. I have to set the current console to 1920x1200 before setting the rest (with -a). If I try -a first, it just blackscreens.

Nuked from the stock Ubuntu image:
- X, GNOME, all GUI apps. NetworkManager, Mono
- All the video/sound/image libraries.
- CUPS, all the printer drivers, colord, GCC and build tools
- More crap that has no use in a Minimal setup.
- The Freescale codecs have been purged and they are not in apt. You'll have to jump a few hoops to get them back.

Tweaks:
- It's been upgraded to 12.04.1 LTS
- Installed fbset and updated fb.modes, also included a 1920x1200 mode
- / is mounted noatime,nodiratime
- password is linaro. too lazy to remember how to clear it
- moved /wlan.ko to /lib/modules/wlan.ko and adjusted scripts

Changes:
[2/1]
- Added wpasupplicant
- Reset the fb to 1280x720-60p at boot

FAQ:
- "Feature XYZ is missing, why did you remove it?"
Because feature XYZ is superfluous on a minimal system. Want it back? apt-cache search XYZ

- How to expand the partition into a larger SD with command line only
Replace the ? with the correct letter, else you'll nuke your drive
dd if=BareMetal1 of=/dev/sd?
fdisk /dev/sd?
delete partition 1, new primary partition 1, first sector at 31248, last sector at default, write
fsck -f /dev/sd?1 and fix errors
resize2fs /dev/sd?1

https://docs.google.com/file/d/0B6ElTIZep22zdEpNVkxSY0N5bHM/edit?usp=sharing
Last edited by dylandn on Fri Feb 01, 2013 6:43 pm, edited 3 times in total.

conversy
Posts: 26
Joined: Sun Dec 16, 2012 2:59 pm

Re: Bare naked Ubuntu

Postby conversy » Thu Jan 31, 2013 6:31 pm

Installed fbset and updated fb.modes, also included a 1920x1200 mode as that's the native resolution of my monitor.


so you can confirm that the GK is able to handle this resolution? That's great news actually.

cheers,

Stéphane

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu

Postby dylandn » Thu Jan 31, 2013 6:41 pm

conversy wrote:so you can confirm that the GK is able to handle this resolution? That's great news actually.


Didnt know that was unknown factor but yes, it's sharp as a tack on my T260HD.

Code: Select all

mode "1920x1200"
    geometry 1920 1200 1920 1200 32
    timings 5069 352 144 49 1 208 3
    hsync high
    vsync high
endmode


I'm now trying my image after uploading it and it seems to be broken. Not sure what changed after I last tested it so try at your own risk until I can get it to work again.

thePCisDead
Posts: 53
Joined: Tue Jan 08, 2013 4:43 pm

Re: Bare naked Ubuntu

Postby thePCisDead » Thu Jan 31, 2013 8:10 pm

Nice.

Any way to convince you to install LXDE and share the image?

If not, I guess I will have something to play with when I get home :)

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu

Postby dylandn » Fri Feb 01, 2013 1:15 am

thePCisDead wrote:Any way to convince you to install LXDE and share the image?


'apt-get xorg lxde' is all you need.
then edit /etc/lxdm/lxdm.conf to set autologin=linaro, probably want numlock=1 too

I usually use xfce so trying lxde for the first time, decent. 18 seconds from power on to the desktop, compared to 20 seconds for my eee1015

hste
Posts: 46
Joined: Sat Dec 29, 2012 11:30 am

Re: Bare naked Ubuntu [update 1]

Postby hste » Fri Feb 01, 2013 5:05 am

Is this a dd image or a vhd image?

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu [update 1]

Postby dylandn » Fri Feb 01, 2013 5:17 am

hste wrote:Is this a dd image or a vhd image?

dd

hste
Posts: 46
Joined: Sat Dec 29, 2012 11:30 am

Re: Bare naked Ubuntu [update 1]

Postby hste » Fri Feb 01, 2013 5:58 am

Thanks.
I also like to start minimal and add what I need

Still I can't get a boot. I don't know how many sdcard's and monitors I have tried.
On the serial output I can't see it getting up.
The kernel is running and detects if I take out or put in devices and monitor.
So for me I think it stops/loops/waiting? before it mounts the rootfs rw.

thePCisDead
Posts: 53
Joined: Tue Jan 08, 2013 4:43 pm

Re: Bare naked Ubuntu

Postby thePCisDead » Fri Feb 01, 2013 1:22 pm

dylandn wrote:
thePCisDead wrote:Any way to convince you to install LXDE and share the image?


'apt-get xorg lxde' is all you need.
then edit /etc/lxdm/lxdm.conf to set autologin=linaro, probably want numlock=1 too

I usually use xfce so trying lxde for the first time, decent. 18 seconds from power on to the desktop, compared to 20 seconds for my eee1015



Thanks. I am struggling getting your image to boot so this will have to wait.

danbro
Posts: 12
Joined: Thu Jan 17, 2013 12:03 pm

Re: Bare naked Ubuntu [update 1]

Postby danbro » Fri Feb 01, 2013 1:49 pm

Not much luck with this one.
I got to a root terminal once and typed a few commands before it locked up but the other 5 times it locked up not long after booting.
(No caps lock).
The screen was barely readable on my 1080i lcd but not doubt thats easy to fix.
wpa_supplicant isn't installed but I guess I could disable wpa on the wifi network and install it as long as the kernel supports the wifi.

Ultimately I'd like to run gentoo on this thing, but firstly I'd like a working linux system with kernel source with config and a script to update the kernel.
That would no doubt be enough for me to develop a gentoo image.
(I'm confident working with gentoo on a pc but I'm clueless when it comes to arm and u-boot).

Thanks for the work.

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu [update 1]

Postby dylandn » Fri Feb 01, 2013 1:51 pm

I left fbset 1920x1200 in /etc/rcS.d/S60fbsetmode, so it may be booting and just unviewable. Pop the SD into a linux machine, mount the partition and edit S60fbsetmode to 1280x720-60p. I'll change this in the image for the next release.

Also, it's running sshd so if you have a usb-ethernet adaptor try getting into it. login linaro/linaro. You can run fbset from a ssh login and see what works, edit S60fbsetmode, etc.

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu [update 1]

Postby dylandn » Fri Feb 01, 2013 2:23 pm

danbro wrote:Ultimately I'd like to run gentoo on this thing, but firstly I'd like a working linux system with kernel source with config and a script to update the kernel.
That would no doubt be enough for me to develop a gentoo image.
(I'm confident working with gentoo on a pc but I'm clueless when it comes to arm and u-boot).


You and me both, bro, I'm working towards this. Plenty of Gentoo/x86 experience but need to make the jump into ARM and figure out how uboot replaces grub.

Noskcaj
Posts: 8
Joined: Fri Feb 01, 2013 5:28 pm

Re: Bare naked Ubuntu [update 2/1]

Postby Noskcaj » Fri Feb 01, 2013 5:33 pm

Good work, i'm going to use this as a server now.

Why call this a "mini.iso" though, this is best compared to ubuntu server really.

danbro
Posts: 12
Joined: Thu Jan 17, 2013 12:03 pm

Re: Bare naked Ubuntu [update 2/1]

Postby danbro » Fri Feb 01, 2013 5:36 pm

Seems to be working fine now with an appropriate fb mode.
Wifi works too ..

Code: Select all

(disable security on your wifi network)
ifconfig wlan2 up
iwconfig wlan2 essid "MYSIID"
dhclient wlan2

(or something like that)
Might try and get portage working from the files in stage3-armv7a-20130118.tar.bz2 .. but its beer o'clock.
Cheers.

dylandn
Posts: 35
Joined: Fri Nov 30, 2012 11:46 pm

Re: Bare naked Ubuntu [update 2/1]

Postby dylandn » Fri Feb 01, 2013 6:39 pm

Noskcaj wrote:Why call this a "mini.iso" though, this is best compared to ubuntu server really.

I havent used the Server version but I have used the Minimal version. Don't know the differences but in my mind "Server" sounds more bloated than "Bare Naked" :D

danbro wrote: Might try and get portage working from the files in stage3-armv7a-20130118.tar.bz2 .. but its beer o'clock.
Cheers.

Mine is running 'emerge system -e' right now. I'm going to try simply swapping the sda1 ubuntu partition for a gentoo partition (copy over modules, etc). And there's a bottle of SeirraNevada Torpedo next to my mouse.

danbro
Posts: 12
Joined: Thu Jan 17, 2013 12:03 pm

Re: Bare naked Ubuntu [update 2/1]

Postby danbro » Fri Feb 01, 2013 8:14 pm

dylandn wrote:Mine is running 'emerge system -e' right now. I'm going to try simply swapping the sda1 ubuntu partition for a gentoo partition (copy over modules, etc). And there's a bottle of SeirraNevada Torpedo next to my mouse.


Good luck with that.
I finished my last torpedo extra ipa a few weeks ago and only have shitty Ontario suds to work with till the next border run.
If it works out a tarball would be appreciated.
Prost!

Noskcaj
Posts: 8
Joined: Fri Feb 01, 2013 5:28 pm

Re: Bare naked Ubuntu [update 2/1]

Postby Noskcaj » Sat Feb 02, 2013 11:21 pm

how can i connect to a wep secured wifi network from this?

troy61
Posts: 3
Joined: Sat Jan 19, 2013 3:23 pm

Re: Bare naked Ubuntu [update 2/1]

Postby troy61 » Mon Feb 04, 2013 3:45 am

Tried and succeeded. Nice image, I like the minimal approach. I still got the problem with the USB keyboard not working after un- and replugging once. What do I have to do to get the HDMI-sound to work?

aruangra
Posts: 7
Joined: Tue Dec 25, 2012 8:46 pm

Re: Bare naked Ubuntu [update 2/1]

Postby aruangra » Mon Feb 04, 2013 8:11 am

Can anyone test this command and report the result?

time echo "scale=2000; a(1)*4" | bc -l

The result should look like this:
real 0m6.565s
user 0m6.550s
sys 0m0.000s


I want to compare with MK808. Thanks.

troy61
Posts: 3
Joined: Sat Jan 19, 2013 3:23 pm

Re: Bare naked Ubuntu [update 2/1]

Postby troy61 » Mon Feb 04, 2013 1:31 pm

I get this on my gk802:
real 0m13.568s
user 0m13.480s
sys 0m0.040s


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest