• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1] 2 3 ... 6
Author Topic: The alternative Debian install method.  (Read 55677 times)
mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« on: October 27, 2009, 01:17:08 AM »

After a bit of tweaking, I present the alternative Debian Squeeze install method, which is more suited to installing to the internal flash.  It can install both Lenny (stable) and Squeeze (testing).  It can be used to be used to install to MMC too, as it uses the SheevaInstaller which is setup to flash either.

It uses debootstrap to build a minimal install (enough to get you booting) from the latest files form the Debian site.  The resulting rootfs.tar.gz can then be used inplace of the Ubuntu rootfs.tar.gz that is supplied with the SheevaInstaller 1.0

The script as it stands is setup to use Squeeze.  If you want to use Lenny, then change all the references in the script, and it should be good to go...

The stage1 build can be done on ANY Ubuntu or Debian system with Internet access, the Stage2 part needs to be done on a sheevaplug (you can of course just do the whole lot on a SheevaPlug with internet access).   Download the attached script, give it execute permissions and execute the script directly with bash (do not launch it with sh, as on Debian and Ubuntu systems, this seems to use dash, and the script will fail to work fully)

The script can be executed from anywhere, however you need to have enough free disk space for the filesystem build and the resulting zip, therefore it's not a great plan to try and build this on the internal NAND!, also remember, the filesystem where the script is saved and executed from needs to be mounted to allow execution and creation of devices  (It's not too happy running on mounted USB keys etc). If you want to build it on a USB key or something, make sure you mount the device with the following options:

Code:
mount -o dev,exec /dev/sda1 /myusb

At the end of the build process (which should only take about 10 minutes), you will be left with a rootfs.tar.gz that can be used to overwrite the one in the sheeva installer 1.0 download.

I have kept the package count low to not bring in too many dependencies, if you want more, just add them to the apt-get line near the end of the script.  The current rootfs is 50MB zipped, and includes the base system, along with ssh for remote logins, and a few other essentials.


Comments/Improvements welcome :-)  Would also like to hear if it works or does not work for you (please no comments here about the Sheevaplug not working, post them in the SheevaPlug installer thread!!)

Latest script and prebuilt images are all available for download here:

http://www.mediafire.com/sheeva-with-debian


You should review the readme file before starting, there are some points in there to consider and some troubleshooting tips.   Don't forget to change the root password after you are up and running, and if you use the prebuilt packages, you should also regenerate ssh keys.
« Last Edit: December 06, 2009, 09:29:59 AM by mgillespie » Logged

davall
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #1 on: October 29, 2009, 02:09:45 AM »

Thanks for your script. Tried to install debian squeeze on sd, but booting debian failed entering runlevel 2 (Id "T0" respawning too fast: disabled for 5 minutes). I had to create the ttyS0 device by hand. Then everything was fine.
Greets, davall
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #2 on: October 29, 2009, 03:03:52 AM »

I'll check that out.  It does try and modify /etc/inittab  with one more suitable for Sheevaplug.  Perhaps it failed because one was already there?   I'll do some checking and update the script if it needs tweaking.

Other than that small issue, glad it worked for someone other than me :-)  Once the SheevaInstaller quirks have been worked out, then this should be a painless and reliable way of getting the latest and greatest Debain onto Sheevaplug.
Logged

davall
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #3 on: October 29, 2009, 03:37:46 AM »

The inittab is o.k. But there was a missing entry of /dev/ttyS0. I had to do mknod -m 660 /dev/ttyS0 c 4 64.

Greets, davall
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #4 on: October 29, 2009, 04:36:42 AM »

The inittab is o.k. But there was a missing entry of /dev/ttyS0. I had to do mknod -m 660 /dev/ttyS0 c 4 64.

Greets, davall

What was the effect of not having this?

Can this be done in the build script?  Is it just a case of adding the following to the script:

Code:
# Setting up ttyS0
chroot /debian/ mknod -m 660 /dev/ttyS0 c 4 64

Or does this need creating post loading of the image onto the plug?

If it's the former, I got some tweaks to the script to do later (make it use relative paths and allow the stage1 bootstrap to work on any Ubuntu arch, but prevent the stage2 on anything but armv5tel.)  I'll add it and test it then.
« Last Edit: October 29, 2009, 04:46:57 AM by mgillespie » Logged

davall
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #5 on: October 29, 2009, 07:32:35 AM »


What was the effect of not having this?
no login was possible

Quote
Can this be done in the build script?  Is it just a case of adding the following to the script:

Code:
# Setting up ttyS0
chroot /debian/ mknod -m 660 /dev/ttyS0 c 4 64

I think so. I looked on another debian squeeze machine. There was a 600 and group tty for ttyS0. Don't know if this is of any importance?
Quote
Or does this need creating post loading of the image onto the plug?

If it's the former, I got some tweaks to the script to do later (make it use relative paths and allow the stage1 bootstrap to work on any Ubuntu arch, but prevent the stage2 on anything but armv5tel.)  I'll add it and test it then.
I've tested your script on nand and sd. With the /dev/ttyS0 entry everything was fine. Good job!

Greets, davall
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #6 on: October 29, 2009, 08:15:47 AM »

Script updated to 1.1.  Thanks for testing.
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #7 on: October 29, 2009, 12:04:48 PM »

Whoops, the script I uploaded earlier had windows line endings, it's now been changed to unix ones.. and might actually work now...  (damn all these windows/linux subtle differences).
Logged

darkscout
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #8 on: October 30, 2009, 01:10:29 AM »

For some reason my plug identifies itself as 'armv5tejl', so your script kindly told me I should run the script that was running on the plug on a plug.
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #9 on: October 30, 2009, 02:53:01 AM »

For some reason my plug identifies itself as 'armv5tejl', so your script kindly told me I should run the script that was running on the plug on a plug.

I have tweaked the script, can you try it again and see if it's happy now?  (I can't really test it, because it works on mine), this is quite odd.  I don't know why 2 sheevaplug are reporting their arm arch differently.  Mine is a 1.3 model for what it's worth...
Logged

darkscout
Newbie
*

Karma: 0
Posts: 26


View Profile
« Reply #10 on: October 30, 2009, 03:06:00 AM »

For some reason my plug identifies itself as 'armv5tejl', so your script kindly told me I should run the script that was running on the plug on a plug.

I have tweaked the script, can you try it again and see if it's happy now?  (I can't really test it, because it works on mine), this is quite odd.  I don't know why 2 sheevaplug are reporting their arm arch differently.  Mine is a 1.3 model for what it's worth...


Well I just on the fly and copy and pasted stuff. I changed a few of the defaults like root password and such Smiley

After messing with it all day at work (with it tucked safely behind my monitor) and fighting windows all day, the Linux Sheeva Installer was quick and painless. Thanks in part to your script. None of that unclean Ubuntu anywhere on my systems.
Logged

knireis
Jr. Member
**

Karma: 2
Posts: 88


View Profile
« Reply #11 on: November 04, 2009, 03:08:22 AM »

the install went ok, but i can not login as root with passwd nosoup4u.
Has the password changed?
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #12 on: November 04, 2009, 03:38:32 AM »

No, the password is set in the script:

Code:
echo "Setting root password to 'nosoup4u'"
echo -e "nosoup4u\nnosoup4u\n" | chroot ./debian/ /usr/bin/passwd root

so it should be: nosoup4u
Logged

knireis
Jr. Member
**

Karma: 2
Posts: 88


View Profile
« Reply #13 on: November 04, 2009, 04:14:03 AM »

strange, i noticed the part of the script where the passwd is set, but nosoup4u is not working. I'll run the script again....
Logged

mgillespie
Full Member
***

Karma: 8
Posts: 239



View Profile
« Reply #14 on: November 04, 2009, 04:22:58 AM »

After it's run, and before you delete the debian build directory, can you open the passwd file and see if it's set it correctly?
Logged

Pages: [1] 2 3 ... 6
Print
Jump to: