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

AW: insufficient dependencies by debootstrap



Thanks for your inputs. In fact, i did something what i wasn't sure if
this is correct. My previous question was more asked in a way "is this
direction correct", but for now I have a working result and show you the
issues :)

The results of my exact work is documented on:
http://www.nslu2-linux.org/wiki/DS101/Debian

I want to extend this description with these details:

Debootstrap is the debian tool to install the debian base system.
I'm using Version: 0.2.45-0.2, and want to install sarge.

Having a packet management system perfectly evaluates packages, is a
very useful base. But - from my opinion - only if it is absolutely
correct.
If we talk of a "minimal base system", there also we would need a
package which defines the collection of those tools to be referenced to.

Since debootstrap is also intended to be executed on a non-debian system
to build a debian system (especially for crossplatform), these
prerequisites are absolutely needed. I wanted to fetch the dependencies
with an automatic script, but needed to complete this list manually.
The exact missing dependencies are:
 - coreutils
 - grep
 - gzip (calls zcat)
 - sed
 - tar
 - SHELL? (this is a special point since shell may be choosen.. but
since we have scripts to be execute inder this environment, it may need
to be defined exactly which one and so I recommend "bash" as reference,
dash may be tested if it works as an alternative)

About the cross-platform issue:
Debootstrap tells to be crossplatform.
/usr/share/doc/debootstrap/README.Debian
But it seems for me, debootstrap wants to enter target platform and
execute some binaries there:
on-i386:~# /usr/sbin/debootstrap --arch powerpc sarge \
testroot http://http.us.debian.org/debian
... manythings happen to be ok until ...
I: Extracting libreadline4... #last thing ok
chroot: cannot run command `mount': Exec format error
W: Failure trying to run: chroot /root/testroot mount -t proc proc /proc
umount: /root/testroot/dev/pts: not found
umount: /root/testroot/dev/shm: not found
umount: /root/testroot/proc/bus/usb: not found
umount: /root/testroot/proc: not mounted

For now I don't know how to solve this issue:
testbox:/usr/lib/debootstrap# grep -R "chroot" .
./functions:  if ! eval chroot "$TARGET" "$@" 2>/dev/null; then
./functions:  if ! eval chroot "$TARGET" "$@"; then
./functions:  in_target_failmsg IN_TARGET_FAIL "Failure trying to run:
%s" "chroot $TARGET $*" "$@"

Due to this reason I decided to fetch all prerequisites of debootstrap
manually for the target arch, extracted the files manually into a mini
chroot, started the target (other linux), went into chroot and executed
there debootstrap - which worked fine (described above)! :)
All of these steps may wouldn't be needed if debootstrap don't execute
any program in target dir.

This may be not that a big approach to correct debootstrap, right?
I may try to fix it for the next days but your opinion required.


Thanks

+-------------------------------+  +-------------------------------+
| Miro Dietiker                 |  | MD Systems Miro Dietiker      |
+-------------------------------+  +-------------------------------+


-----Ursprüngliche Nachricht-----
Von: Frans Pop [mailto:aragorn@tiscali.nl] 
Gesendet: Freitag, 30. Dezember 2005 15:20
An: debian-boot@lists.debian.org
Cc: Miro Dietiker, MD Systems; debootstrap@packages.debian.org
Betreff: Re: insufficient dependencies by debootstrap

On Thursday 29 December 2005 15:45, Miro Dietiker, MD Systems wrote:
> Debootstrap depends on the following (in addition to the listed in
> package!):
> - grep
> - sed
> - gzip (zcat)
> - tar
> 
> I had also a dependency on "ls" (coreutils) on libattr1 which
> is not listed.
>
> What is the reason for not listing this in the package?
> It made me much work to try to run debootstrap till it cancelled
> due to missing prerequisites, building these again, rebuilding
> system and retry to boot debootstrap...

The reason is probably that these commands are so basic that they are 
expected to be present on any linux/unix system.

On a Debian system at least, these commands are part of the "minimal
base 
system" that is always there. This also means that they do not need to
be 
listed as explicit dependencies for the package.

However, I do agree with you that this should be documented somewhere, 
especially as debootstrap is explicitly intended to be used for 
cross-platform installations.

The Debian Installation Guide has a section in an appendix [1] that 
clearly needs to be updated in this respect.
The current text includes:
   "The tool that the Debian installer uses, which is recognized as the
    official way to install a Debian base system, is debootstrap. It
uses
    wget and ar, but otherwise depends only on /bin/sh. Install wget and
    ar if they aren't already on your current system, then download and
    install debootstrap."

This is obviously no longer true. Debootstrap was completely overhauled 
not to long ago and it seems this aspect has been overlooked.

I'm CCing the debootstrap maintainer for comments. My suggestion would
be 
to list the commands required in the debootstrap manpage.

AJ: I would very much appreciate it if you could provide a list of 
required commands so I can update this in the installation guide.

Cheers,
FJP

[1] http://d-i.alioth.debian.org/manual/en.i386/apds03.html



Reply to: