Exercise 34.5: Recovering Using the Install Image on Debian/Ubuntu
Hi,
I'm sorry if I ask even one more question again. But Exercise 34.5 is only explaining the recovery of the packet on RedHat-based systems. Unfortunately I was not able to transfer the commands to Ubuntu and recover the Package from the according image. I can mount the Ubuntu install media in the rescue environment, but cannot find the requested zsh package:
alu@ubuntu-dt-vm:~$ find /media/ -name 'zsh'
alu@ubuntu-dt-vm:~$
What I found is:
alu@ubuntu-dt-vm:/media/alu/Ubuntu 24.04.1 LTS amd64/dists/noble/main/binary-amd64$ ls -lh
total 52K
-r--r--r-- 1 alu alu 52K Aug 27 18:22 Packages.gz
Which I guess is only a reference file or something?
By the way, the image is the full 6.2 GB Ubuntu Desktop 24.04 image.
Thanks,
Urs
Comments
-
Hi Urs,
In that case you can use 'dpkg -i <package_name.deb>' with the full path, for the associated deb file you are going to install by hand. In the case of Debian, the zsh tool is available as well. The thing is that in the DVD iso for Ubuntu I can't find the zsh tool. But you can mount the iso file and search for ".deb" files, as follows:
luis@selinuxbox:~$ find /media/cdrom/ -name "*.deb"
/media/cdrom/pool/main/a/amd64-microcode/amd64-microcode_3.20231019.1ubuntu2_amd64.deb
/media/cdrom/pool/main/b/b43-fwcutter/b43-fwcutter_1%3a019-11build1_amd64.deb
/media/cdrom/pool/main/b/bcache-tools/bcache-tools_1.0.8-5build1_amd64.deb
/media/cdrom/pool/main/b/binutils/binutils_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/binutils-common_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/binutils-x86-64-linux-gnu_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/libbinutils_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/libctf0_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/libctf-nobfd0_2.42-4ubuntu2_amd64.deb
/media/cdrom/pool/main/b/binutils/libgprofng0_2.42-4ubuntu2_amd64.deb[...]
That's on Debian 12. The thing is to find a simple package that doesn't require dependencies to install, but you can try.
Another way to make this work for Debian/Ubuntu, is to copy the zsh .deb file to the USB stick (and all its dependencies as well), so when you rescue the system, you can have the right packages to install.
Regards,
Luis.0 -
Hi Luis,
Thank you very much. With the Debian iso I managed it to install the according zsh packages.
In calse someone else will have to do that too, or you consider to update this course, these are the steps which I made:
- Downloading the latest full Debian iso.
- Booting into the Ubuntu install media.
- Open the terminal and do as follows.
ubuntu@ubuntu:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS loop0 7:0 0 1.6G 1 loop /rofs loop1 7:1 0 471M 1 loop loop2 7:2 0 874.4M 1 loop loop3 7:3 0 4K 1 loop /snap/bare/5 loop4 7:4 0 269.8M 1 loop /snap/firefox/4793 loop5 7:5 0 10.7M 1 loop /snap/firmware-updater/127 loop6 7:6 0 505.1M 1 loop /snap/gnome-42-2204/176 loop7 7:7 0 38.8M 1 loop /snap/snapd/21759 loop8 7:8 0 74.3M 1 loop /snap/core22/1564 loop9 7:9 0 500K 1 loop /snap/snapd-desktop-integration/178 loop10 7:10 0 149.6M 1 loop /snap/thunderbird/507 loop11 7:11 0 116.8M 1 loop /snap/ubuntu-desktop-bootstrap/237 loop12 7:12 0 10.5M 1 loop /snap/snap-store/1173 loop13 7:13 0 91.7M 1 loop /snap/gtk-common-themes/1535 sr0 11:0 1 5.8G 0 rom /cdrom sr1 11:1 1 3.7G 0 rom vda 253:0 0 128G 0 disk ├─vda1 253:1 0 1M 0 part ├─vda2 253:2 0 2G 0 part └─vda3 253:3 0 126G 0 part └─ubuntu--vg-ubuntu--lv 252:0 0 126G 0 lvm ubuntu@ubuntu:~$ cd /mnt ubuntu@ubuntu:/mnt$ sudo mkdir sr{0,1} sysimage ubuntu@ubuntu:/mnt$ ls sr0 sr1 sysimage ubuntu@ubuntu:/mnt$ sudo su root@ubuntu:/mnt# mount /dev/sr0 /mnt/sr0 mount: /mnt/sr0: WARNING: source write-protected, mounted read-only. root@ubuntu:/mnt# mount /dev/sr1 /mnt/sr1 mount: /mnt/sr1: WARNING: source write-protected, mounted read-only. root@ubuntu:/mnt# vgscan Found volume group "ubuntu-vg" using metadata type lvm2 root@ubuntu:/mnt# vgchange -ay 1 logical volume(s) in volume group "ubuntu-vg" now active root@ubuntu:/mnt# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert ubuntu-lv ubuntu-vg -wi-a----- <126.00g root@ubuntu:/mnt# lvdisplay --- Logical volume --- LV Path /dev/ubuntu-vg/ubuntu-lv LV Name ubuntu-lv VG Name ubuntu-vg LV UUID w50odd-lx32-TSbE-KtHx-tXiO-5nzY-DBx7iB LV Write Access read/write LV Creation host, time ubuntu, 2024-10-29 07:36:06 +0000 LV Status available # open 0 LV Size <126.00 GiB Current LE 32255 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0 root@ubuntu:/mnt# mount /dev/ubuntu-vg/ubuntu-lv /mnt/sysimage/ root@ubuntu:/mnt# ls sr0 sr1 sysimage root@ubuntu:/mnt# cd sr1 root@ubuntu:/mnt/sr1# ls boot dists firmware isolinux pool README.mirrors.txt css doc install md5sum.txt README.html README.source debian EFI install.amd pics README.mirrors.html README.txt root@ubuntu:/mnt/sr1# find . -name '*zsh*' ./pool/main/z/zsh ./pool/main/z/zsh/zsh_5.9-4+b5_amd64.deb ./pool/main/z/zsh/zsh-common_5.9-4_all.deb root@ubuntu:/mnt/sr1# dpkg --root=/mnt/sysimage/ --install /mnt/sr1/pool/main/z/zsh*.deb dpkg: error: cannot access archive '/mnt/sr1/pool/main/z/zsh*.deb': No such file or directory root@ubuntu:/mnt/sr1# dpkg --root=/mnt/sysimage/ --install /mnt/sr1/pool/main/z/zsh/zsh*.deb Selecting previously unselected package zsh. (Reading database ... 211566 files and directories currently installed.) Preparing to unpack .../z/zsh/zsh_5.9-4+b5_amd64.deb ... Unpacking zsh (5.9-4+b5) ... Selecting previously unselected package zsh-common. Preparing to unpack .../z/zsh/zsh-common_5.9-4_all.deb ... Unpacking zsh-common (5.9-4) ... Setting up zsh-common (5.9-4) ... Setting up zsh (5.9-4+b5) ... Processing triggers for debianutils (5.17build1) ... Processing triggers for man-db (2.12.0-4build2) ... root@ubuntu:/mnt/sr1#
- Remove the Ubuntu install media and reboot the system.
Thanks again, Luis!
Best wishes,
Urs1 -
Hi Urs, it's a pleasure! I'm glad you were able to do it on Ubuntu/Debian.
Regards,
Luis.0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 791 Linux Foundation IT Professional Programs
- 353 Cloud Engineer IT Professional Program
- 178 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 147 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 47 LFC110 Class Forum - Discontinued
- 71 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 38 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 697 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 148 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 29 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 134 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 153 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 97 All In Program
- 97 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)