o debootstrap quer remover a pasta de destino, por quê?

3

Eu usei no passado debootstrap para fazer o bootstrap dos sistemas Debian e Ubuntu. Mas desta vez, tentando inicializar um sistema Ubuntu a partir de um sistema de resgate Debian 6 (Nota: eu não tenho escolha sobre o sistema de resgate, então por favor não sugira usar o Ubuntu ou algo assim, ele não estaria disponível para mim). / p>

Considere a seguinte estrutura de pastas /target , que desejo usar para inicializar o sistema:

/dev/md0 on /target type ext4 (rw,relatime,data=ordered)
/dev/md1 on /target/home type ext4 (rw,relatime,data=ordered)
/dev/md2 on /target/var type ext4 (rw,relatime,data=ordered)

Agora estou executando o seguinte comando debootstrap :

# LANG=en_US.UTF-8 debootstrap --exclude=dhcp3-common,dhcp3-client,laptop-detect,tasksel,tasksel-data --include=bash-completion,sudo,lshw,tmux,mercurial,etckeeper,unzip,mc,htop,pciutils,usbutils,openssh-server,localepurge,unattended-upgrades --print-debs --variant=minbase --arch=amd64 precise /target
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/ubuntu-archive-keyring.gpg
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: apt-utils bzr gnupg gpgv libapt-inst1.4 libapt-pkg4.12 libbsd0 libedit2 libevent-2.0-5 libexpat1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libpci3 libreadline6 libsqlite3-0 libstdc++6 libusb-0.1-4 libusb-1.0-0 libwrap0 lsb-release mime-support openssh-client python python-apt python-apt-common python-bzrlib python-configobj python2.7 readline-common ubuntu-keyring ucf
adduser base-files base-passwd bash bsdutils busybox-initramfs coreutils cpio dash debconf debianutils diffutils dpkg e2fslibs e2fsprogs findutils gcc-4.6-base grep gzip hostname ifupdown initramfs-tools initramfs-tools-bin initscripts insserv iproute klibc-utils libacl1 libattr1 libblkid1 libbz2-1.0 libc-bin libc6 libcomerr2 libdb5.1 libdbus-1-3 libdrm-intel1 libdrm-nouveau1a libdrm-radeon1 libdrm2 libelf1 libffi6 libgcc1 libglib2.0-0 libklibc liblzma5 libmount1 libncurses5 libncursesw5 libnih-dbus1 libnih1 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpciaccess0 libpcre3 libplymouth2 libpng12-0 libselinux1 libslang2 libss2 libssl1.0.0 libtinfo5 libudev0 libuuid1 locales login lsb-base makedev mawk module-init-tools mount mountall multiarch-support ncurses-base ncurses-bin passwd perl-base plymouth procps python-minimal python2.7-minimal sed sensible-utils sysv-rc sysvinit-utils tar tzdata udev upstart util-linux xz-utils zlib1g apt apt-utils bash-completion bzr etckeeper gnupg gpgv htop libapt-inst1.4 libapt-pkg4.12 libbsd0 libedit2 libevent-2.0-5 libexpat1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libpci3 libreadline6 libsqlite3-0 libstdc++6 libusb-0.1-4 libusb-1.0-0 libwrap0 localepurge lsb-release lshw mc mercurial mime-support openssh-client openssh-server pciutils python python-apt python-apt-common python-bzrlib python-configobj python2.7 readline-common sudo tmux ubuntu-keyring ucf unattended-upgrades unzip usbutils
I: Deleting target directory
rm: cannot remove '/target/var': Device or resource busy
rm: cannot remove '/target/home': Device or resource busy

Estou executando isso como root , mas as últimas três linhas me enganam. Se eu tentar o mesmo, mas sem /target/var e /target/home , as últimas linhas mudam para:

I: Deleting target directory
rm: cannot remove '/target': Device or resource busy

Eu sou usando:

# debootstrap --version
debootstrap 1.0.42ubuntu0.1

de aqui e instalei-o via dpkg -i debootstrap_1.0.42ubuntu0.1_all.deb , que afirmava ser bem-sucedido. Eu também tentei instalar a variante buildd em vez da minbase one. O mesmo resultado.

O que está acontecendo aqui? Por que debootstrap tenta remover a pasta de destino?

Observação: também verifiquei a página man , mas não consigo encontrar uma opção para evitar essa tentativa de remoção.

Observe também que: instalar o chaveiro do arquivo Ubuntu não muda nada. Eu usei wget -O /usr/share/keyrings/ubuntu-archive-keyring.gpg http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg para isso.

    
por 0xC0000022L 09.01.2013 / 04:07

2 respostas

1

Bummer, o problema parece ser um bug (?) em debootstrap . Quando eu executo o comando assim:

# LANG=en_US.UTF-8 debootstrap --exclude=dhcp3-common,dhcp3-client,laptop-detect,tasksel,tasksel-data --include=bash-completion,sudo,lshw,tmux,mercurial,etckeeper,unzip,mc,htop,pciutils,usbutils,openssh-server,localepurge,unattended-upgrades --print-debs --variant=minbase --arch=amd64 precise /target

Eu obtenho a saída (saída completa):

I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
gpgv: Signature made Thu Apr 26 00:49:42 2012 CEST using DSA key ID 437D05B5
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key <[email protected]>"
I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: apt-utils bzr gnupg gpgv libapt-inst1.4 libapt-pkg4.12 libbsd0 libedit2 libevent-2.0-5 libexpat1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libpci3 libreadline6 libsqlite3-0 libstdc++6 libusb-0.1-4 libusb-1.0-0 libwrap0 lsb-release mime-support openssh-client python python-apt python-apt-common python-bzrlib python-configobj python2.7 readline-common ubuntu-keyring ucf
adduser base-files base-passwd bash bsdutils busybox-initramfs coreutils cpio dash debconf debianutils diffutils dpkg e2fslibs e2fsprogs findutils gcc-4.6-base grep gzip hostname ifupdown initramfs-tools initramfs-tools-bin initscripts insserv iproute klibc-utils libacl1 libattr1 libblkid1 libbz2-1.0 libc-bin libc6 libcomerr2 libdb5.1 libdbus-1-3 libdrm-intel1 libdrm-nouveau1a libdrm-radeon1 libdrm2 libelf1 libffi6 libgcc1 libglib2.0-0 libklibc liblzma5 libmount1 libncurses5 libncursesw5 libnih-dbus1 libnih1 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpciaccess0 libpcre3 libplymouth2 libpng12-0 libselinux1 libslang2 libss2 libssl1.0.0 libtinfo5 libudev0 libuuid1 locales login lsb-base makedev mawk module-init-tools mount mountall multiarch-support ncurses-base ncurses-bin passwd perl-base plymouth procps python-minimal python2.7-minimal sed sensible-utils sysv-rc sysvinit-utils tar tzdata udev upstart util-linux xz-utils zlib1g apt apt-utils bash-completion bzr etckeeper gnupg gpgv htop libapt-inst1.4 libapt-pkg4.12 libbsd0 libedit2 libevent-2.0-5 libexpat1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libpci3 libreadline6 libsqlite3-0 libstdc++6 libusb-0.1-4 libusb-1.0-0 libwrap0 localepurge lsb-release lshw mc mercurial mime-support openssh-client openssh-server pciutils python python-apt python-apt-common python-bzrlib python-configobj python2.7 readline-common sudo tmux ubuntu-keyring ucf unattended-upgrades unzip usbutils
I: Deleting target directory
rm: cannot remove '/target': Device or resource busy

Agora estou removendo o --print-debs da linha de comando e, de repente, recebo uma mensagem de erro útil:

I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id 630239CC130E1A7FD81A27B140976EAF437D05B5)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: apt-utils bzr gnupg gpgv libapt-inst1.4 libapt-pkg4.12 libbsd0 libedit2 libevent-2.0-5 libexpat1 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libpci3 libreadline6 libsqlite3-0 libstdc++6 libusb-0.1-4 libusb-1.0-0 libwrap0 lsb-release mime-support openssh-client python python-apt python-apt-common python-bzrlib python-configobj python2.7 readline-common ubuntu-keyring ucf
I: Checking component main on http://archive.ubuntu.com/ubuntu...
E: Couldn't find these debs: mc localepurge htop mercurial

Uma mensagem de erro que não recebi no primeiro comando invocado. Isso parece um bug real. Talvez ninguém, a não ser algumas pessoas, use o argumento --print-debs , por isso nunca foi encontrado. Remover os nomes dos pacotes da lista no argumento --include , em seguida, inicia o processo de bootstrapping bem-sucedido (e do que parece até agora).

    
por 0xC0000022L 09.01.2013 / 19:35
-1

adicione --keep-debootstrap-dir à linha de comando (mesmo quando usar --print-debs ). Para impedir que o diretório de destino seja excluído.

    
por user358148 12.12.2014 / 18:46