All times are UTC-06:00




Post new topic  Reply to topic  [ 19 posts ] 
Author Message
PostPosted: Mon Feb 06, 2012 8:30 am 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
Hi:

Not sure if this has already been discussed or documented... we created a clean install of Debian Squeeze armel based - for all those who want to start with a clean slate this might be interesting.

Here we go:

- this how-to assumes you have a working OS running on the box

1. create a Debian boot SD 2. Some prep work and creating the new Debian env
  • - make a copy of the kernel modules - if not already mounted, mount the 2nd partition (OS partition) to your file system
    Code:
    mkdir /media/devel
    mount /dev/sda2 /media/devel
    tar -zcvf /root/efikamx.tar.gz /media/devel/lib/modules/2.6.31.14.26-efikamx
    umount /media/devel
    - format 2nd partition (OS partition)
    Code:
    mkfs.ext4 /dev/sda2
    - mount formatted 2nd partition (OS partition)
    Code:
    mount /dev/sda2 /media/devel
    - install debootstrap (if it can't be found - run apt-get update first)
    Code:
    apt-get install debootstrap
    - prep the new OS partition
    Code:
    debootstrap --arch=armel --foreign stable /media/devel/
3. Finalizing the new Debian env and clean up
  • - Once previous debootstrap process is completed, chroot into the new env
    Code:
    mount --bind /dev /media/devel/dev
    mount -t proc none /media/devel/proc
    chroot /media/devel /bin/bash --login
    - Finalize the debootstrap process
    Code:
    /debootstrap/debootstrap --second-stage
    - edit /etc/apt/sources.list
    Code:
    nano /etc/apt/sources.list

    and enter
    Code:
    # deb http://debian.mirror.iweb.ca/debian/ squeeze main

    deb http://debian.mirror.iweb.ca/debian/ squeeze main
    deb-src http://debian.mirror.iweb.ca/debian/ squeeze main

    deb http://security.debian.org/ squeeze/updates main
    deb-src http://security.debian.org/ squeeze/updates main

    # squeeze-updates, previously known as 'volatile'
    deb http://debian.mirror.iweb.ca/debian/ squeeze-updates main
    deb-src http://debian.mirror.iweb.ca/debian/ squeeze-updates main
    - update the apt repository
    Code:
    apt-get update
    - install ssh server (there will be no gui via HDMI - ssh will be the only way to connect and interact with the box
    Code:
    apt-get install openssh-server
    - add network interfaces by editing /etc/network/interfaces
    Code:
    nano /etc/network/interfaces

    and enter
    Code:
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp

    auto wlan0
    - add fstab information /etc/fstab
    Code:
    nano /etc/fstab

    and enter
    Code:
    /dev/sda2 / ext4 defaults 0 0
    /dev/sda1 /boot/ ext3 defaults 0 0
    - install and fix locales
    Code:
    apt-get install locales
    dpkg-reconfigure locales

    (I chose the US locales and chose en_US.UTF-8 as the system default)

    - set root password
    Code:
    passwd
    - fix/add hostname
    Code:
    nano /etc/hostname

    and enter your desired hostname

    - fix/add hostname to host config file /etc/hosts
    Code:
    nano /etc/hosts
    and add the hostname from the previous step the first line after localhost
    Code:
    127.0.0.1 localhost "your_hostname_here"
    ::1 localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    - exit the chroot env
    Code:
    exit
    - copy the kernel modules back
    Code:
    tar -zxvf /root/efikamx.tar.gz -C /media/devel/lib/modules/
    rm /root/2.6.31.14.26-efikamx.tar.gz
    - unmount the 2nd partition (OS partition)
    Code:
    cd ~
    sync
    umount /media/devel
4. Shutdown and reboot into new Debian env
  • - shutdown the box
    Code:
    shutdown -h now
    - once shutdown remove the SD card

    - turn on the box
5. You should now be able to ssh into your new clean Debian squeeze environment (it is using the pre-existing kernel)


Let me know if you come across any issues, have suggestions to do things better or else...

Enjoy!! and Cheers
loonix
arX corp.


Last edited by arXcorp on Sun Feb 12, 2012 5:50 pm, edited 4 times in total.

Top
   
 Post subject:
PostPosted: Mon Feb 06, 2012 8:56 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 88
Location: Central Europe
Thanks :)


Top
   
PostPosted: Wed Feb 08, 2012 1:13 pm 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
Image

Based on the above how-to, we now created a console based image - we use it as a rescue SD

compressed size is 79M and it fits on a 256M SD card

You can get it from here: http://www.arxcorp.com/arxbox/files/arm ... 208.img.xz
MD5 = 8982ea1f8f8d3807d811c4efc77aa099

username: root
password: password

We would appreciate feedback for further improvements.

Any interest/possibility in hosting it with the other available linux images on http://www.powerdeveloper.org/platforms/efikamx/linux?

Thanks

loonix
arX corp.


Last edited by arXcorp on Fri Feb 10, 2012 9:27 pm, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Wed Feb 08, 2012 2:11 pm 
Offline
Genesi

Joined: Fri Sep 24, 2004 1:39 am
Posts: 1422
Nice work!

R&B :-)

_________________
http://bbrv.blogspot.com


Top
   
 Post subject:
PostPosted: Thu Feb 09, 2012 5:33 am 
Offline

Joined: Fri Sep 24, 2004 1:39 am
Posts: 88
Location: Central Europe
The image file is now mirrored on PowerDeveloper:
http://www.powerdeveloper.org/asset/by-id/135

There is also a link to this page in our Linux Support section on the PowerDeveloper front page.


Top
   
 Post subject:
PostPosted: Fri Feb 10, 2012 8:53 pm 
Offline

Joined: Thu Feb 09, 2012 8:38 am
Posts: 1
Hi loonix,

The image you made was exacly what I was looking for thanks! But could you also give the username and password to use with the image, as i cannot loggin now.

Thanks!


Top
   
 Post subject:
PostPosted: Fri Feb 10, 2012 9:25 pm 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
ooops!! '-)

user: root
pass: password

I added it now to the above post as well - thanks for letting me know

Thanks

loonix
arX corp.


Top
   
PostPosted: Sat Feb 11, 2012 4:22 pm 
Offline

Joined: Thu May 26, 2011 5:30 am
Posts: 7
Quote:
- install ssh server (there will be no gui via HDMI - ssh will be the only way to connect and interact with the box
Why cannot I use the console? Is the HDMI output not working?

I want install a clean wheeze armhf via your how-to and http://wiki.debian.org/ArmHardFloatChroot and I want a working X server for texlive. Or should I use the armhf image?

Thanks for help.


Top
   
 Post subject:
PostPosted: Sat Feb 11, 2012 11:19 pm 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
Quote:
Why cannot I use the console? Is the HDMI output not working?
Yes it is, but the genesi bootsplash is showing on the screen via hdmi. You need to make changes to the boot.scr file and remove the 'splash' from the boot arguments - We did not cover this in the how to. The image we made does boot into console (tty7) but you can get to tty1-6 through the usual CTRL-ALT F1-6 combination.
Quote:
I want install a clean wheeze armhf via your how-to and http://wiki.debian.org/ArmHardFloatChroot and I want a working X server for texlive. Or should I use the armhf image?
It shouldn't matter which image you use - it is the debootstrap line that you would change to armhf and the sources.list that will define the distro and architecture of your new install.

Let us know if it works.

loonix
arX corp.


Top
   
 Post subject:
PostPosted: Sun Feb 12, 2012 3:07 pm 
Offline

Joined: Thu May 26, 2011 5:30 am
Posts: 7
If I chroot, the file /debootstrap/debootstrap cannot be found.

I have tested with "--keep-debootstrap-dir" and the directory /debootstrap exists but without a file debootstrap.

edit:
Sry, no pms allowed. You have two typing mistakes in your how-to:
cd /media/devel/lib/modules
/etc/apt/spources.list

Why you don't write this simple commands?
Code:
tar -zcvf /root/efikamx.tar.gz /media/devel/lib/modules/2.6.31.14.26-efikamx
tar -zxvf /root/efikamx.tar.gz -C /media/devel/lib/modules/


Top
   
 Post subject:
PostPosted: Sun Feb 12, 2012 5:16 pm 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
Hey robert86
Quote:
You have two typing mistakes in your how-to:
cd /media/devel/lib/modules
/etc/apt/spources.list
thanks for pointing those out - I corrected them in the how to now
Quote:
Why you don't write this simple commands?
Code:
tar -zcvf /root/efikamx.tar.gz /media/devel/lib/modules/2.6.31.14.26-efikamx
tar -zxvf /root/efikamx.tar.gz -C /media/devel/lib/modules/
Thanks - there is always an easier way of doing things in Linux I guess :wink: - I merged your suggestions into the how to as well.

Do you still have the bootstrap issue?

loonix
arX corp.


Top
   
 Post subject:
PostPosted: Mon Feb 13, 2012 8:58 am 
Offline

Joined: Sun Feb 12, 2012 7:34 pm
Posts: 2
Robert86, I think you probably forgot to remount sda2
mount /dev/sda2 /media/devel
before doing debootstrap, so it was trying to install on your sd card and ran out of space. You can confirm by looking at debootstrap.log if it got written.
Good luck


Top
   
 Post subject:
PostPosted: Mon Feb 13, 2012 9:14 am 
Offline

Joined: Thu May 26, 2011 5:30 am
Posts: 7
I have check the sd and /media/devel is empty. I think, I have mount before debootstrap. (I have tested over five times.)

The last lines of debootstrap.log are:
Code:
gpg: Total number processed: 5
gpg: imported: 5 (RSA: 4)
gpg: no ultimately trusted keys found
Setting up apt (0.8.15.9+b1) ...
gpg: key F42584E6: "Lenny Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 55BE302B: "Debian Archive Automatic Signing Key (5.0/lenny) <ftpmaster@debian.org>" not changed
gpg: key 6D849617: "Debian-Volatile Archive Automatic Signing Key (5.0/lenny)" not changed
gpg: key B98321F9: "Squeeze Stable Release Key <debian-release@lists.debian.org>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>" not changed
gpg: Total number processed: 5
gpg: unchanged: 5
Setting up libept1 (1.0.5+b1) ...
Setting up apt-utils (0.8.15.9+b1) ...
Setting up aptitude (0.6.5-1) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode.
Setting up tasksel-data (3.08) ...
Setting up perl-modules (5.14.2-7) ...
Setting up libswitch-perl (2.16-2) ...
Setting up perl (5.14.2-7) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode.
Setting up tasksel (3.08) ...
I'm confused, because no debootstrap directory exists after success. But if I start debootstrap with additional parameter "--keep-debootstrap-dir" the directory exists and it contains debootstrap.log and depath, but no debootstrap.

Can the system run without debootstrap --second-stage?


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 2:10 pm 
Offline

Joined: Wed Feb 01, 2012 9:55 am
Posts: 24
Location: Ontario
Quote:
Can the system run without debootstrap --second-stage?
I think this step is required to complete the installation and provide a fully functioning environment.

I have used this method several times and installed debian - not sure what else the issue could be - any chance you could provide a session to the dev env so we could take a look?

loonix
arX corp.


Top
   
 Post subject:
PostPosted: Tue Feb 14, 2012 3:30 pm 
Offline

Joined: Thu May 26, 2011 5:30 am
Posts: 7
Nope, I am outside the home for two weeks. If I back, I will test again.

See you later.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 19 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
PowerDeveloper.org: Copyright © 2004-2012, Genesi USA, Inc. The Power Architecture and Power.org wordmarks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org.
All other names and trademarks used are property of their respective owners. Privacy Policy
Powered by phpBB® Forum Software © phpBB Group