Power Developer
https://powerdeveloper.org/forums/

Clean Debian Squeeze install - how to
https://powerdeveloper.org/forums/viewtopic.php?f=7&t=2176
Page 1 of 2

Author:  arXcorp [ Mon Feb 06, 2012 8:30 am ]
Post subject:  Clean Debian Squeeze install - how to

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.

Author:  APerson [ Mon Feb 06, 2012 8:56 am ]
Post subject: 

Thanks :)

Author:  arXcorp [ Wed Feb 08, 2012 1:13 pm ]
Post subject:  Debian squeeze armel image fits 256MB SD

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.

Author:  bbrv [ Wed Feb 08, 2012 2:11 pm ]
Post subject: 

Nice work!

R&B :-)

Author:  APerson [ Thu Feb 09, 2012 5:33 am ]
Post subject: 

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.

Author:  inytar [ Fri Feb 10, 2012 8:53 pm ]
Post subject: 

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!

Author:  arXcorp [ Fri Feb 10, 2012 9:25 pm ]
Post subject: 

ooops!! '-)

user: root
pass: password

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

Thanks

loonix
arX corp.

Author:  robert86 [ Sat Feb 11, 2012 4:22 pm ]
Post subject:  Re: Clean Debian Squeeze install - how to

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.

Author:  arXcorp [ Sat Feb 11, 2012 11:19 pm ]
Post subject: 

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.

Author:  robert86 [ Sun Feb 12, 2012 3:07 pm ]
Post subject: 

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/

Author:  arXcorp [ Sun Feb 12, 2012 5:16 pm ]
Post subject: 

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.

Author:  hidd3n_bit [ Mon Feb 13, 2012 8:58 am ]
Post subject: 

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

Author:  robert86 [ Mon Feb 13, 2012 9:14 am ]
Post subject: 

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?

Author:  arXcorp [ Tue Feb 14, 2012 2:10 pm ]
Post subject: 

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.

Author:  robert86 [ Tue Feb 14, 2012 3:30 pm ]
Post subject: 

Nope, I am outside the home for two weeks. If I back, I will test again.

See you later.

Page 1 of 2 All times are UTC-06:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/