![Debian 8.10을 통해 Ubuntu(18.04)를 부팅 해제하는 데 몇 가지 문제가 있습니다.](https://linux55.com/image/132605/Debian%208.10%EC%9D%84%20%ED%86%B5%ED%95%B4%20Ubuntu(18.04)%EB%A5%BC%20%EB%B6%80%ED%8C%85%20%ED%95%B4%EC%A0%9C%ED%95%98%EB%8A%94%20%EB%8D%B0%20%EB%AA%87%20%EA%B0%80%EC%A7%80%20%EB%AC%B8%EC%A0%9C%EA%B0%80%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
제가 사용하고 있는 호스트는 복구 시스템으로 Debian 8.10(커널 4.9.85)을 제공합니다. 나는 과거에 이것을 사용하여 Ubuntu를 부팅했습니다.debootstrap
여기에서.
저는 설치와 같은 몇 가지 준비 단계를 사용하고 있습니다. 그래서 제가 사용하는 URL apt-cacher-ng
(localhost:3142
http://localhost:3142/us.archive.ubuntu.com/ubuntu/) 그리고 ubuntu-archive-keyring
.
호출 debootstrap
은 다음과 같습니다.
LANG=C debootstrap --keep-debootstrap-dir --verbose --include=ubuntu-server,bash-completion,sudo,lshw,tmux,unzip,pciutils,usbutils,openssh-server,unattended-upgrades,linux-image-generic,cron --variant=minbase --arch=$(dpkg --print-architecture) bionic /target http://localhost:3142/us.archive.ubuntu.com/ubuntu/
--verbose
( 뭔가 잘못된 게 있나 싶어서 추가했지만 소용이 없었습니다.)
지금 실행할 때 이상한 점은 debootstrap
이 새 버전에서는 결국 단계만 표시된다는 것입니다.수색,확인하다그리고발췌(패키지 하위 집합의 경우) 그러나 설정 중인 해당 패키지에 대한 정보는 없습니다.
그래서 "그래, 해냈으니 xenial
다시 해보자"라고 속으로 말했더니 똑같은 루틴이 나오더라구요.
+ debootstrap --keep-debootstrap-dir --verbose --include=ubuntu-server,bash-completion,sudo,lshw,tmux,unzip,pciutils,usbutils,openssh-server,unattended-upgrades,linux-image-generic,cron --variant=minbase --arch=
amd64 xenial /target http://localhost:3142/us.archive.ubuntu.com/ubuntu/
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 790BC7277767219C42C86F933B4FE6ACC0B21F32)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Found additional base dependencies: acpid apport apt-utils at bcache-tools btrfs-tools busybox-initramfs byobu ca-certificates cloud-guest-utils cloud-initramfs-copymods cloud-initramfs-dyn-netconf cpio crda
cryptsetup cryptsetup-bin curl dh-python distro-info-data dmeventd dmsetup ethtool fonts-ubuntu-font-family-console gawk gcc-5-base gettext-base gir1.2-glib-2.0 git git-man gnupg gpgv grub-legacy-ec2 ifenslave i
fupdown initramfs-tools initramfs-tools-bin initramfs-tools-core iproute2 iso-codes iw klibc-utils kmod libapt-inst2.0 libapt-pkg5.0 libasn1-8-heimdal libasprintf0v5 libbsd0 libcurl3-gnutls libdbus-1-3 libdbus-g
lib-1-2 libdevmapper-event1.02.1 libdrm2 libdumbnet1 libedit2 liberror-perl libevent-2.0-5 libexpat1 libffi6 libfuse2 libgdbm3 libgirepository-1.0-1 libglib2.0-0 libgmp10 libgnutls30 libgpm2 libgssapi-krb5-2 lib
gssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhogweed4 libhx509-5-heimdal libicu55 libidn11 libk5crypto3 libkeyutils1 libklibc libkrb5-26-heimdal libkrb5-3 libkrb5support0 libl
dap-2.4-2 liblvm2app2.2 liblvm2cmd2.02 liblz4-1 liblzo2-2 libmnl0 libmpdec2 libmpfr4 libmspack0 libnettle6 libnewt0.52 libnl-3-200 libnl-genl-3-200 libp11-kit0 libpci3 libperl5.22 libplymouth4 libpng12-0 libpopt
0 libpython-stdlib libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib libpython3.5-minimal libpython3.5-stdlib libreadline5 libreadline6 libroken18-heimdal librtmp1 libsasl2-2 libsasl2-modules-db libsigs
egv2 libslang2 libsqlite3-0 libssl1.0.0 libstdc++6 libtasn1-6 libusb-0.1-4 libusb-1.0-0 libutempter0 libwind0-heimdal libwrap0 linux-base linux-firmware linux-image-4.4.0-21-generic linux-image-extra-4.4.0-21-ge
neric lsb-release lvm2 mdadm mime-support open-iscsi open-vm-tools openssh-client openssh-sftp-server openssl overlayroot patch perl perl-modules-5.22 plymouth python python-apt-common python-minimal python2.7 p
ython2.7-minimal python3 python3-apport python3-apt python3-chardet python3-dbus python3-debian python3-gi python3-minimal python3-newt python3-pkg-resources python3-problem-report python3-pycurl python3-six pyt
hon3-software-properties python3.5 python3.5-minimal readline-common screen software-properties-common sosreport ubuntu-cloudimage-keyring ubuntu-keyring ucf udev update-notifier-common vim vim-common vim-runtim
e vlan wireless-regdb xfsprogs xz-utils
I: Checking component main on http://localhost:3142/us.archive.ubuntu.com/ubuntu...
I: Retrieving acpid 1:2.0.26-1ubuntu2
I: Validating acpid 1:2.0.26-1ubuntu2
[...]
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting adduser...
I: Extracting base-files...
I: Extracting base-passwd...
[...]
I: Extracting zlib1g...
이상하게도 과거에는 설정 단계가 원활하게 진행되었습니다. 그런데 이제는 조용히 건너뛴다고요? ! 이전 debootstrap
버전은 Bionic Beaver(Ubuntu 18.04)를 이해하지 못하기 때문에 작동하지 않습니다.
문제가 될 수 있는 두 가지가 있다고 생각합니다.
- 커널 버전 차이: Ubuntu 18.04에서는 4.15, Debian 8.10에서는 4.9.85.
- libc 버전의 차이: 2.27-3ubuntu1 및 2.19-18+deb8u10.
...그러나 두 경우 모두 동일한 차이가 있을 것으로 예상합니다 debootstrap
. 또한 xenial
(Ubuntu 16.04)의 경우에도 동일한 차이를 기 대해서는 안됩니다. 하지만 오류가 표시되지 않고 대신 중요한 설정 단계를 건너뛰고 chroot
with /target
명령 을 입력해 보십시오 /bin/bash
.
# LANG=en_US.UTF-8 chroot /target /bin/bash
groups: cannot find name for group ID 0
I have no name!@rescue:/#
좀 파봤지만 아무것도 발견하지 못했습니다 /etc/passwd
. 잠시만 기다려주세요. /dev
, /proc
에 /sys
바인드 설치됩니다 /target
.
해당 Debian 복구 시스템에서 Ubuntu를 성공적으로 부팅하려면 이 문제를 어떻게 해결해야 합니까? 스키마가 호스트 및 대상과 일치하는데 설치 단계 실행을 방해하는 요인은 무엇입니까?
알아채다:최신 커널로 부팅할 수 없습니다. 또는 오히려 이와 같은 것을 달성하는 유일한 방법은 먼저 일종의 지역 구조 시스템을 설치하는 것입니다.
내가 사용하고 있는 소프트웨어
$ debootstrap --version
debootstrap 1.0.95ubuntu1
$ uname -a
Linux rescue 4.9.85 #2 SMP Thu Mar 1 08:06:18 CET 2018 x86_64 GNU/Linux
나는 또한 그것을 설치했다 ubuntu-archive-keyring
.
내가 또 무엇을 시도했나요?
나는 또한 --foreign
에 전달하려고 시도했습니다 debootstrap
.이유/debootstrap/debootstrap
하지만 나중에 사용할 수 있는 실행 파일도 남겨 두어야 합니다 --second-stage
. 그러나 현재 보고 있는 것과 똑같은 동작을 보여줍니다.아니요명령 --foreign
줄 전환 후 /debootstrap/debootstrap
대상 파일 시스템에서 부팅이 완료되지 않습니다.
또한 다음을 사용하여 설치를 시도했습니다 debootstrap
. 그런 다음 에 연결합니다.jessie-backports
apt-get install -t jessie-backports debootstrap
debootstrap 1.0.89~bpo8+1
/usr/share/debootstrap/scripts/bionic
/usr/share/debootstrap/scripts/gutsy
답변1
알았어, 알아냈어. 호출은 debootstrap
종료 코드 1을 반환하여 실패를 나타냅니다. 여러 명령을 연결하고 하위 쉘을 사용하는 방식 때문에 이것을 놓쳤습니다.
debootstrap
그 사실을 알아낸 후에는 내가 겪고 있는 문제가 무엇인지 알아내야 했습니다 . 이는 (대상 내부) 관점에서는 분명하지 않았지만 /debootstrap/debootstrap.log
확실히 뒤늦게 알게 되었습니다. 그래서 반성해야 합니다 debootstrap
. 이를 수행하려면 (추적을 켠 상태에서) 쉘 스크립트를 명시적으로 호출하면 실제로 내부적으로 /usr/sbin/debootstrap
( 대상 내부에서) 출력을 볼 수 있습니다. 제 경우에는 다음 추적 항목과 출력에 문제가 표시됩니다./bin/sh -x
/debootstrap/debootstrap.log
mknod
+ mknod -m 666 /target/dev/null c 1 3
mknod: '/target/dev/null': File exists
이 문제는 내가 대상을 설치 /dev
하고 /proc
들어가면서 /sys
발생 했습니다.전진(무엇한 번 일한과거에! ).
새 debootstrap
버전에서는 무조건 실패하는 것 같습니다. 해당 함수 호출은 mknod
에서 옵니다 setup_devices_simple
./usr/share/debootstrap/functions
스크립트를 및(및 후속 버전)과 비교하여 debootstrap
확인한 한 가지 주목할만한 변화는 함수 호출이 함수에서 (스크립트의) 함수로 이동된다는 것입니다. 변형을 만들거나 "외부" 코어에서 실행하지 않는 한 이 함수는 호출되므로 이전보다 더 일찍 호출됩니다.1.0.59
1.0.89~bpo8+1
setup_devices
second_stage_install
first_stage_install
gutsy
setup_devices_simple
fakechroot
mknod
이전에 실패하지 않았던 이유는 예전에는 장치를 .tgz 파일로 저장하고 그 자리에서 압축을 풀었는데 지금은 debootstrap
직접 사용하기 때문인 것 같습니다.mkdnod