Welcome! Log In Create A New Profile

Advanced

apt-get upgrade and some other apt options won't work

Posted by Ultrazauberer 
apt-get upgrade and some other apt options won't work
September 21, 2010 05:19AM
Hello again. Now I have some problems with the package manager APT. I already searched by google and find some solutions for it. But the problem is, that system critical packages will be removed. So I'm unsure if I can do it on the Dockstar. Here's the log:

debian:~$ apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  apt apt-utils debian-archive-keyring dpkg initramfs-tools klibc-utils
  libavahi-client3 libavahi-common-data libavahi-common3 libavcodec52
  libavformat52 libavutil49 libc-bin libc6 libcups2 libdb4.8 libfltk1.1
  libklibc libldap-2.4-2 liblzma2 libmpg123-0 libpam-modules libpam-runtime
  libpam0g libsasl2-2 libsqlite3-0 libusb-0.1-4 linux-base
  linux-image-2.6.32-5-kirkwood login mpg123 passwd ucf wget x11-common
  xz-utils
36 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/42.5MB of archives.
After this operation, 664kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: warning: 'update-rc.d' not found in PATH or not executable.
dpkg: 1 expected program(s) not found in PATH or not executable.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)

And when I'm installing an additional package:
debian:~$ apt-get install dnsutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  bind9-host libbind9-60 libdns66 libgeoip1 libisc60 libisccc60 libisccfg60
  liblwres60 libxml2
Suggested packages:
  rblcheck geoip-bin
Recommended packages:
  geoip-database xml-core
The following NEW packages will be installed:
  bind9-host dnsutils libbind9-60 libdns66 libgeoip1 libisc60 libisccc60
  libisccfg60 liblwres60 libxml2
0 upgraded, 10 newly installed, 0 to remove and 36 not upgraded.
Need to get 0B/2153kB of archives.
After this operation, 4882kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
dpkg: warning: 'update-rc.d' not found in PATH or not executable.
dpkg: 1 expected program(s) not found in PATH or not executable.
NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)

Hope someone knows the solution.
ecc
Re: apt-get upgrade and some other apt options won't work
September 21, 2010 07:01AM
Ultrazauberer Wrote:
-------------------------------------------------------
> dpkg: warning: 'update-rc.d' not found in PATH or not executable.

Are you mixing emdebian and debian sources in your /etc/apt/sources.list? I think embdebian doesn't require Perl at all, so it works around some standard Debian utilities. I suspect you are now running the regular Debian version of dpkg, which doesn't like this situation.

You can use "apt-cache policy dpkg" to see which one is installed and where it came from. You might have to explicitly re-install the version from emdebian (if that's what you want); you'll probably have to do it "by hand" since dpkg is broken. Or you could go the other way: remove the emdebian source and "upgrade" to full Debian. (That's what I run; it's fine as long as you keep the package lists somewhere other than in NAND.)
Re: apt-get upgrade and some other apt options won't work
September 21, 2010 08:10AM
Hmm, ok. I installed Debian sometime in the end of August with Jeff's script. It's on an usb-stick.

debian:~$ cat /etc/apt/sources.list
deb http://ftp.de.debian.org/debian squeeze main

debian:~$ apt-cache policy dpkg
dpkg:
  Installed: 1.15.7.2
  Candidate: 1.15.8.4
  Version table:
     1.15.8.4 0
        500 http://ftp.de.debian.org squeeze/main Packages
 *** 1.15.7.2 0
        100 /var/lib/dpkg/status

That's what is shown.
ecc
Re: apt-get upgrade and some other apt options won't work
September 21, 2010 10:01AM
Ultrazauberer Wrote:
-------------------------------------------------------
> debian:~$ cat /etc/apt/sources.list
> deb http://ftp.de.debian.org/debian squeeze main
>
> debian:~$ apt-cache policy dpkg
> dpkg:
> Installed: 1.15.7.2
> Candidate: 1.15.8.4
> Version table:
> 1.15.8.4 0
> 500 http://ftp.de.debian.org squeeze/main
> Packages
> *** 1.15.7.2 0
> 100 /var/lib/dpkg/status

OK, forget all that nonsense I said about emdebian then.

/usr/sbin/update-rc.d is provided by the sysv-rc package. Check that and possibly re-install it?
Re: apt-get upgrade and some other apt options won't work
September 21, 2010 11:01AM
Here's the solution: simply add the /usr/sbin to the $PATH variable:

debian:~$ PATH=$PATH:/usr/sbin
debian:~$ $PATH
-bash: /usr/bin:/bin:/sbin:/usr/sbin: No such file or directory

apt-get upgrade is currently running :)
Hi there,

I have successfully installed the Debian (with the help of your script) and not totally new to linux, but when it comes to Kernel (making) etc., I am totally a beginner.

So, after manually starting an apt-get upgrade/update today, I can see that there is a new Kernel available (inux-image-2.6.32-5-kirkwood)
Is it okay to install it out of the box? Or is there anything I have to check / do first?

I don't want to destroy my nice running system, but maybe that'll give me some things like LED support or stuff like that without doing the other changes mentioned in this forum? And of course the security itself is a factor for me checking the updates on a regular base...


Thanks in advance!
ecc
Re: apt-get upgrade and some other apt options won't work
September 22, 2010 11:40AM
Cyrrel Wrote:
-------------------------------------------------------
> So, after manually starting an apt-get upgrade/update today,
> I can see that there is a new Kernel available (inux-image-2.6.32-5-kirkwood)
> Is it okay to install it out of the box? Or is there anything I have to check / do first?

Currently, installing it won't do anything for you except waste space.

First, the dockstar-specific changes aren't in the kernel.org or Debian kernels yet. Second, the kernel package just installs the vmlinuz and initramfs files in /boot. On the dockstar, these need to be converted to u-boot format by the mkimage tool, and (depending on your installation) perhaps flashed to a NAND partition. None of those happen automatically yet. Eventually the flash-kernel package should be taught about the dockstar, but that will be difficult while there are so many styles of installation in use (USB, 2 NAND partitions, single NAND partition, etc.)
uh, so, as far it concerns me, I better do not install Kernel patches, right?

Good thing, I haven't pressed the YES button ;-)


thanks for your reply!
Re: apt-get upgrade and some other apt options won't work
September 22, 2010 04:57PM
I strongly second the warning.

Being a complete uboot/dockstar newbie too, I temporary trashed my Debain by dewy-eyed installing this kernel update offered.

Recovery is simple though: Just boot the original Pogo Linux, mount /dev/sda1 on /mnt and do a
/mnt/usr/bin/mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-5 -d /mnt/boot/vmlinuz-2.6.32-5-kirkwood /mnt/boot/uImage
/mnt/usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /mnt/boot/initrd.img-2.6.32-5-kirkwood /mnt/boot/uInitrd
(cf. Jeff's installation script).

BTW: A big "Thanks!" to Jeff for making my first 24/7 home server possible!

Regards,
Heinz
H.Humpel
Re: apt-get upgrade and some other apt options won't work
September 23, 2010 02:03PM
After the kernel update my dockstar is unreachable, too :/.

Quote
hkramski
Recovery is simple though: Just boot the original
Pogo Linux, mount /dev/sda1 on /mnt and do a

> /mnt/usr/bin/mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-5 -d /mnt/boot/vmlinuz-2.6.32-5-kirkwood
> /mnt/boot/uImage /mnt/usr/bin/mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d /mnt/boot/initrd.img-2.6.32-5-kirkwood /mnt/boot/uInitrd

Tried this, but it didn't work for me.
Any other hints ?

Greetings, H.Humpel
Thanks for the above, worked for me after disconnected power and rebooting. Awesome little machine this thing is turning out to be.
ano
Re: apt-get upgrade and some other apt options won't work
September 24, 2010 06:04PM
many thanks to hkramski for the kernel fix, that worked for me. This would be something for an installation note ;) I guess many people run into this problem after upgrading.



Edited 1 time(s). Last edit at 09/24/2010 06:59PM by ano.
Re: apt-get upgrade and some other apt options won't work
September 26, 2010 04:06PM
Broke mine! woohoo! So after getting most of my config right, I've killed it with the kernel update.

I'm very used to using apt-get update / upgrade as a matter of course. In the dockstar realm, that killed me as described by the reason above.

I can get into the dockstar but not into debian. The dmesg dump ends with:

ADDRCONF(NETDEV_UP): eth0: link is not ready

-- edit--

Thanks to hkramski and ano for pointing out I missed the fix!



Edited 1 time(s). Last edit at 09/26/2010 05:34PM by gzader.
ano
Re: apt-get upgrade and some other apt options won't work
September 26, 2010 04:23PM
did not help the post by hkramski http://forum.doozan.com/read.php?2,1042,1111#msg-1111 ? worked like a charm here.
Re: apt-get upgrade and some other apt options won't work
September 26, 2010 05:07PM
At first it didn't work and I posted that here, but after unplugging it and unplugging the network cable (may or may not be needed) it worked fine the second time. Gotta remove that other post too now. :)

The mount command for those who might need it:
mount /dev/sda1 /mnt

:)

Thanks all, hkramski, ano !



Edited 1 time(s). Last edit at 09/26/2010 05:31PM by gzader.
Sebastian
Re: apt-get upgrade and some other apt options won't work
September 26, 2010 05:16PM
Thanks hkramski, this rescued also my DockStar after kernel upgrade!

Sebastian
Re: apt-get upgrade and some other apt options won't work
September 28, 2010 05:14AM
How can I save the PATH variable permantly? After the reboot the PATH variable is restored.
Hi again,

so I finally have the Serial cable set up and running. So this is what I get :

[    8.961171]  sda:Begin: Loading essential drivers ... done.                  
Begin: Running /scripts/init-premount ... done.                                 
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
 sda1 sda2                                                                      
[   13.191897] sd 0:0:0:0: [sda] Assuming drive cache: write through            
[   13.198050] sd 0:0:0:0: [sda] Attached SCSI disk                             
Begin: Running /scripts/local-premount ... done.                                
[   13.490673] EXT2-fs: sda1: couldn't mount because of unsupported optional fe.
mount: Invalid argument                                                         
Begin: Running /scripts/local-bottom ... done.                                  
done.                                                                           
Begin: Running /scripts/init-bottom ... mount: No such file or directory        
done.                                                                           
mount: No such file or directory                                                
mount: No such file or directory                                                
Target filesystem doesn't have requested /sbin/init.                            
No init found. Try passing init= bootarg.                                       
(initramfs)

Looks like the system cannot mount sda1 ?!
Am I missing something ?
What is an "unsupported optional fe." ???

Greetings, H.Humpel
What is an "unsupported optional fe." ???

OK, I guess the should be an "unsupported optional feature".
Anyone any idea what is going on here and how I can try to fix it ?
I don't know where to start... can't find the /scripts/ -dirs etc.

Any help and/or hint would be appreciated.

Greetings, H.Humpel
Hi again,

so I got it working again! Hooray!
I just set up a new debian system on an USB-stick and copied the boot-directory back to the non-booting system. And after a manual (forced) e2fsck everything is running fine again.
Looks like the new initramfs had an error (as the other files in the boot dir had the same size on both systems).

Greetings, Bjoern
Re: apt-get upgrade and some other apt options won't work
October 04, 2010 08:30AM
Quote
H.Humpel
Looks like the new initramfs had an error (as the other files in the boot dir had the same size on both systems).

It sounds like it may have been the same problem others had, but for some reason running mkimage on the initrd file didn't work for you. Hopefully that was just a one-time glitch.... :-) Everyone needs to remember in the future, though, to run mkimage after any kernel update or whenever during an upgrade we see that initrd was regenerated. Until it's automated, though, I expect a lot of problems. ;-)
Re: apt-get upgrade and some other apt options won't work
October 05, 2010 03:30PM
Wow, I ran upgrade some time ago and rebooted today. It took me some time to realize that I had exactly this problem. Copied the boot files from another dockstar and I am back in business.

I have not understood by now, what the mkimage commands from above should do as I did not find a manual entry. I will try to understand this later on. For now I shall keep from upgrading my systems.

Thanks H.Humpel for the tip to copy the files.
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: