Welcome! Log In Create A New Profile

Advanced

Install testing from the very beginning?

Posted by tdd 
tdd
Install testing from the very beginning?
December 05, 2013 08:05PM
Hi folks,

Just picked up a couple of Pogoplug E02s and I want to install Debian. Is it possible to just install the testing distribution from the very start rather than go the squeeze -> testing route?

I've tried the obvious, which was to edit pogoplug-debian.sh and changing RELEASE=squeeze to RELEASE=testing, but it doesn't get very far:

# Starting debootstrap installation
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional required dependencies: insserv libaudit-common libaudit1 libbz2-1.0 libcap2 libdb5.1 libsemanage-common libsemanage1 libslang2 libustr-1.0-1
I: Found additional base dependencies: adduser cpio debian-archive-keyring devio gnupg gpgv initramfs-tools iproute2 klibc-utils kmod libapt-pkg4.12 libbsd0 libedit2 libffi6 libgcrypt11 libgmp10 libgnutls-openssl27 libgnutls26 libgnutls28 libgpg-error0 libgssapi-krb5-2 libhogweed2 libidn11 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libncursesw5 libnettle4 libp11-kit0 libprocps0 libreadline6 libssl1.0.0 libstdc++6 libtasn1-3 libtasn1-6 libudev1 libusb-0.1-4 libuuid-perl libwrap0 linux-base openssh-client procps readline-common u-boot-tools vim-common
I: Checking component main on http://ftp.us.debian.org/debian...
E: Couldn't find these debs: linux-image-2.6-kirkwood
debootstrap failed.
See /tmp/debian/debootstrap/debootstrap.log for more information.
tdd
Re: Install testing from the very beginning?
December 05, 2013 09:17PM
A little progress:

On EXTRA_PACKAGES= line, change "linux-image-2.6-kirkwood" to "linux-image-kirkwood".

On KERNEL_VERSION= line, change "2.6.32-5-kirkwood" to "3.11-2-kirkwood".

This gets you all the way through the retrieving and validating, then dies because xzcat is missing:

I: Retrieving zlib1g
I: Validating zlib1g
I: Chosen extractor for .deb packages: ar
I: Extracting libacl1...
I: Extracting libattr1...
I: Extracting libaudit-common...
E: The xzcat is not available on the system
debootstrap failed.
See /tmp/debian/debootstrap/debootstrap.log for more information.
tdd
Re: Install testing from the very beginning?
December 05, 2013 09:55PM
Easy enough to download the package with xzcat:

wget http://ftp.us.debian.org/debian/pool/main/x/xz-utils/xz-utils_5.0.0-2_armel.deb

But it needs a library:

Pogoplug:/tmp/tmp/usr/bin$ ./xzcat
./xzcat: error while loading shared libraries: liblzma.so.2: cannot open shared object file: No such file or directory

You can of course download and extract liblzma2_5.0.0-2_armel.deb, but /usr/lib and /usr/local/lib are not writable, and ldconfig is not available.

I think I'm going to stop here and wait until someone can tell me if I'm wasting time trying to reinvent the wheel here. :-)
Re: Install testing from the very beginning?
December 06, 2013 02:41AM
Of course, it's nice to build your own rootfs from the kernel tree. But if you want to save time, use this wheezy rootfs:
http://forum.doozan.com/read.php?2,12096,12096#msg-12096

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tdd
Re: Install testing from the very beginning?
December 06, 2013 08:01AM
Thank you very much for that.

Last night I went ahead and installed squeeze on my Pogoplug. Am I correct in thinking that upgrading it to wheezy is not as simple as changing "squeeze" to "wheezy" in /etc/apt/sources.list and dist-upgrading? If so, os there a tutorial for upgrading that install to wheezy that'll prevent me from screwing it up?
Re: Install testing from the very beginning?
December 06, 2013 03:47PM
tdd,

> Am I correct in thinking that
> upgrading it to wheezy is not as simple as
> changing "squeeze" to "wheezy" in
> /etc/apt/sources.list and dist-upgrading?

It is as simple as that, no extra steps needed. But you should clone your USB stick to another one in case there is problem.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 12/06/2013 04:00PM by bodhi.
tdd
Re: Install testing from the very beginning?
December 07, 2013 11:12AM
Thanks bodhi, I did that.

I was warned about changes to a configuration file. I recognize the package name as something from the initial install. I chose to "keep your currenty-installed version". Was that correct? File and diff is below.

Is there anything else I should be aware of before I reboot? :-) It seems like other people in other threads I read are having lots of trouble.

Setting up flash-kernel (3.3+deb7u2) ...

Configuration file `/etc/kernel/postinst.d/zz-flash-kernel'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** zz-flash-kernel (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/kernel/postinst.d/zz-flash-kernel 2000-01-01 23:15:50.000000000 -0600
+++ /etc/kernel/postinst.d/zz-flash-kernel.dpkg-new 2012-07-10 15:19:57.000000000 -0500
@@ -1,10 +1,37 @@
#!/bin/sh

-version=""
-bootopt=""
+# see Chapter 8 of Debian Linux Kernel Handbook

-# passing the kernel version is required
-[ -z "" ] && exit 0
+set -e
+
+# conffile still present, but flash-kernel removed
+if ! which flash-kernel >/dev/null 2>&1; then
+ exit 0
+fi
+
+# this script is used as postinst.d and postrm.d script; this is used to
+# differentiate between the two
+self="$0"
+
+# see 8.1, Kernel hooks
+abi="$1"
+# ignored
+_vmlinuz="${2:-/boot/vmlinuz-$abi}"
+set -- $DEB_MAINT_PARAMS
+action="$1"
+action="${action#\'}"
+action="${action%\'}"
+# ignored
+_version="$2"
+_version="${version#\'}"
+_version="${version%\'}"
+
+# only call flash-kernel once on install, upgrade, removal or purge
+# XXX apparently kernel postinst doesn't always pass maintainer scripts
+# arguments
+case "$(basename "$(dirname "$self")")/$action" in
+ postinst.d/configure|postinst.d/|postrm.d/remove|postrm.d/)
+ exec flash-kernel "$abi"
+ ;;
+esac

-echo "Running flash-kernel "
-flash-kernel
tdd
Re: Install testing from the very beginning?
December 07, 2013 11:26AM
Also, is there a tutorial or description of how the whole thing works? I've had a Debian box for years, but without grub I'm kinda lost understanding how this is all working. For example, I don't understand why I don't see /dev/sda1 in /etc/fstab, and I'm not sure what to do if this thing doesn't boot up to the point where I can ssh in.
tdd
Re: Install testing from the very beginning?
December 07, 2013 11:32AM
Aaah! I also forgot about this one. I kept currently-installed as well.

Configuration file `/etc/default/rcS'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** rcS (Y/I/N/O/D/Z) [default=N] ? d
--- /etc/default/rcS 2000-01-01 23:15:50.000000000 -0600
+++ /etc/default/rcS.dpkg-new 2012-12-10 13:26:42.000000000 -0600
@@ -7,13 +7,18 @@
#
# This file belongs to the "initscripts" package.

-TMPTIME=0
-SULOGIN=no
-DELAYLOGIN=no
-UTC=yes
-VERBOSE=no
-FSCKFIX=no
-RAMRUN=no
-RAMLOCK=no
-HWCLOCKACCESS=no
-CONCURRENCY=shell
+# delete files in /tmp during boot older than x days.
+# '0' means always, -1 or 'infinite' disables the feature
+#TMPTIME=0
+
+# spawn sulogin during boot, continue normal boot if not used in 30 seconds
+#SULOGIN=no
+
+# do not allow users to log in until the boot has completed
+#DELAYLOGIN=no
+
+# be more verbose during the boot process
+#VERBOSE=no
+
+# automatically repair filesystems with inconsistencies during boot
+#FSCKFIX=no
tdd
Re: Install testing from the very beginning?
December 07, 2013 11:36AM
Okay, here's why I have so much confusion. I just found this, which I could have used to install wheezy in the first place:

http://projects.doozan.com/debian/

I used this, which I thought was current, which installed squeeze:

http://mehl.co/articles/installing_debian_on_the_pogoplug/

grumble grumble
tdd
Re: Install testing from the very beginning?
December 07, 2013 01:21PM
I examined the files, came to the conclusion that using the new versions was correct, and rebooted. It came back up. :-)

But I will still like to understand more about how it works, why /dev/sda1 isn't in /etc/fstab and how I would change type to ext3 (I've added the journal), and how I can fix any boot problems if I can't ssh to the device.
Re: Install testing from the very beginning?
December 07, 2013 03:17PM
tdd,

- The very first thing you should do is to setup netconsole, if you don't have serial console. netconsole will let you recover from a bad rootfs to a certain degree (till before the kernel is loaded), and hopefully to observe more of kernel booting.
http://forum.doozan.com/read.php?3,14
- /dev/sda1 does not need to be in fstab. You have /dev/root. That's the rootfs where you change to ext3.
- Another alternative "rescue" is to use my rootfs mentioned above, boot the box, mount your rootfs and examine and/or fix it.

But the best way to learn the booting process is to have serial console.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tdd
Re: Install testing from the very beginning?
December 07, 2013 04:43PM
You are very courteous to help me. Thank you. I'll read about netconsole. Could you link me to a thread for adding a serial cable? I want to make sure I can troubleshoot things.

To give you some idea of what I'm doing, I've had a Debian box sitting since the 90s handling firewalling between WAN and LAN, DHCP server for the LAN, CUPS for printing, Samba, identd, fetchmail for a few people, SpamAssassin, rsync for backing up across the WAN, as well as for a shell for using mutt/finch/irssi.

I'm testing one of these little $15 devices out to see how much I can reasonably move onto them. I hope I can move everything off to them, and free up a much more expensive computer for something else.

Right now the only real problem is disk I/O out the USB port. I have a Sandisk Cruzer Fit 32gb, and small file I/O is pretty poor. It took hours to upgrade from squeeze to wheezy. I have a Sandisk Extreme on the way, because all benchmarks I found show it has much better 4K random I/O.
Re: Install testing from the very beginning?
December 07, 2013 05:32PM
tdd,

These little boxes will do all of the above, pretty efficiently. I would move all those chores to the Pogo E02(s) without hesitation.

Here is a very good thread we have recently about serial console:
http://forum.doozan.com/read.php?8,13263

And you probably already knew this: it is pefectly OK to have a USB thumb for rootfs formatted as Ext3, if you move all your logging to /tmp. And even set up a swap file if you don't expect to use swap, but used as a temporary crash prevention (if you do swap then HDD is needed). I do run mine Pogoplugs with Ext3 rootfs on USB Sandisk Fit, with a cloned backup USB standing by and scheduled rsync backup (but have not needed to use these at all).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 12/07/2013 05:34PM by bodhi.
tdd
Re: Install testing from the very beginning?
December 08, 2013 05:48PM
I configured netconsole, put /var/log on tmpfs, and have ordered the parts to put a USB console port on the front. (I'm actually going to cut a whole on the front and put a panel mount female USB connector there.)

Thanks for the tips.
tdd
Re: Install testing from the very beginning?
December 19, 2013 01:45PM
I'd like to report that the Sandisk Extreme USB flash drives work amazingly well as disks for Pogoplugs. Small random I/O is indeed very fast--much, much faster than other USB drives. Installing Debian from scratch took barely a few minutes. Pretty neat stuff.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: