[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: multistrap rootfs with initramfs



Made progress ... see end.

Neil Williams wrote:
> On Sun, 01 Nov 2009 16:50:29 +1100
> "Brendan Simon (eTRIX)" <brendan.simon@etrix.com.au> wrote:
> 
>> I managed to boot into a linux environment from an initramfs provided by
>> a vendor SDK.  I then nfsmounted the multistrap rootfs to /nfsrootfs,
>> chroot to /nfsrootfs and executed 'dpkg --configure -a'.
>>
>> It segfaulted :(
> 
> Might not have been dpkg, it could simply be one of the executables
> called by the maintainer scripts. What was the output?
> 
>> Running dpkg without args works ok, so it is the correct architecture :)
> 
> So use dpkg --configure $package to pin the blame on one package or
> call the maintainer scripts
> directly, /var/lib/dpkg/info/$package.preinst etc.
> 
>> I know it is vague, but what could be causing the segfault ??
> 
> Wrong libc between the init and the one needed by dpkg?
> 
> Weird problems with NFS?
> 
> Is there a serial connection or an SSH login you can try instead of
> actually mounting over NFS?
> 
>> Any other dpkg commands I can/should try ??
> 
> dpkg -l to see which packages have been configured and which are broken.


dpkg -l show all packages unconfigured.  Tried configuring a few
explicitly but got the immediate seg fault.

Not NFS as I also tried NFS mounting a debian rootfs that was supplied
in a vendor SDK.  dpkg --configure -a worked perfectly, as did aptitude
update and upgrade.

My multistrap rootfs was 'raw'.  i.e. no extra files added.
So added the /etc/fstab file (copied from vendor SKD rootfs).
Now dpkg --configure -a does not segfault :)

I guess it's a dpkg issue rather than a multistrap issue, but one would
have hoped for a more informative error message rather than a segfault.
Not sure if it's the non existence of /etc/fstab or the fact that one of
the important filesystems were missing/not-mounted ... e.g. /proc or
/sysfs ... probably the latter.

Anyway it now works, though I did get a few other errors (see below),
but the subsequent dpkg -l shows all packages now configured.
Guess I need to just make sure there are enough of the basic config
files (as wookey's script does).

Would it be good idea for multistrap to provide some basic default
config files.  eg. /etc/fstab, /etc/mtab, ... ??

------------------------------

[root@localhost ~]$ chroot /nfsroot/

I have no name!@localhost:/# ls
bin   dev  home  mnt   root  selinux  tmp  var
boot  etc  lib   proc  sbin  sys      usr

I have no name!@localhost:/# mount
warning: can't open /etc/mtab: No such file or directory

I have no name!@localhost:/# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
iU  apt            0.7.20.2em1    Advanced front-end for dpkg (gripped)
iU  base-files     5lenny2em1     Debian base system miscellaneous files
(grip
iU  base-passwd    3.5.20em1      Debian base system master password and
group
iU  bash           3.2-4em1       The GNU Bourne Again SHell (gripped)
...
<snip>
...
iU  wget           1.11.4-2em1    retrieves files from the web (gripped)
iU  whiptail       0.52.2-11.3em1 Displays user-friendly dialog boxes
from she
iU  zlib1g         1:1.2.3.3.dfsg compression library - runtime (gripped)

Only error messages shown below.

I have no name!@localhost:/# dpkg --configure -a

Setting up libc6 (2.7-18em1) ...
Use of uninitialized value in concatenation (.) or string at
/usr/share/perl5/D.

Setting up makedev (2.3.1-88em1) ...
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices
/sbin/MAKEDEV: warning: can't read /proc/devices

Setting up debian-archive-keyring (2009.01.31em1) ...
gpg: waiting for lock (held by 2876) ...
gpg: keyring `/etc/apt/trusted.gpg' created
gpg: /etc/apt/trustdb.gpg: trustdb created
gpg: key 6070D3A1: public key "Debian Archive Automatic Signing Key
(4.0/etch) d
gpg: key ADB11277: public key "Etch Stable Release Key
<debian-release@lists.ded
gpg: key BBE55AB3: public key "Debian-Volatile Archive Automatic Signing
Key (4d
gpg: key F42584E6: public key "Lenny Stable Release Key
<debian-release@lists.dd
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key
(5.0/lenny)d
gpg: key 6D849617: public key "Debian-Volatile Archive Automatic Signing
Key (5d
gpg: Total number processed: 6
gpg:               imported: 6  (RSA: 2)
gpg: no ultimately trusted keys found

Setting up bash (3.2-4em1) ...
update-alternatives: unable to make
/usr/share/man/man7/builtins.7.gz.dpkg-tmp y

Setting up apt (0.7.20.2em1) ...
gpg: key 6070D3A1: "Debian Archive Automatic Signing Key (4.0/etch)
<ftpmaster@d
gpg: key ADB11277: "Etch Stable Release Key
<debian-release@lists.debian.org>" d

Setting up udev (0.125-7em1) ...
unable to open device '/class/net/*'
A chroot environment has been detected, udev not started.

Setting up grip-config (0.1.2em1) ...
OK

Setting up sysvinit (2.86.ds1-61em1) ...
sysvinit: creating /dev/initctl
init: timeout opening/writing control channel /dev/initctl


I have no name!@localhost:/# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  apt            0.7.20.2em1    Advanced front-end for dpkg (gripped)
ii  base-files     5lenny2em1     Debian base system miscellaneous files
(grip
ii  base-passwd    3.5.20em1      Debian base system master password and
group
ii  bash           3.2-4em1       The GNU Bourne Again SHell (gripped)
...
<snip>
...
ii  wget           1.11.4-2em1    retrieves files from the web (gripped)
ii  whiptail       0.52.2-11.3em1 Displays user-friendly dialog boxes
from she
ii  zlib1g         1:1.2.3.3.dfsg compression library - runtime (gripped)

I have no name!@localhost:/#



Reply to: