Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to rescue my system. After a faulty installation of linux-firmware_1.38_all.deb (subprocess /usr/bin/dpkg returned an error code (1))
the system does not boot, even in recovery mode. Using a live cd, I downloaded the linux-firmware version I had previously, and try to install it with dpkg but I can't direct it to the directories I need:
If you are unsure how to do this, here is the script that I use
Code:
#!/bin/bash
sudo mount /dev/sdaX /mnt/
#sudo mount /dev/sdaY /mnt/boot
sudo mount --bind /proc /mnt/proc
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys /mnt/sys
sudo mount --bind /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt/ /bin/bash
# execute your commands here
sudo umount /mnt/etc/resolv.conf
sudo umount /mnt/sys
sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
#sudo umount /mnt/boot
sudo umount /mnt/
You just have to change the sdaX to whatever partition your / exists on and uncomment the two commented lines and change to what partition your boot resides on (only if you have them on a separate partition.) You can either copy/paste the lines one at a time in the terminal, or just make the script executable and run it.
I also made attempts by adding init=/bin/bash at the end of the kernel line at grub start-up. So I booted in runlevel1, but after viewing the dpkg log, there were far too many packages half installed and half configured so I reinstalled the system. From what I understand by looking at your script and reading man mount, you mount the directories of the live cd at the /mnt. Why is that?
Sorry, I think I was ambiguous, I meant why mount some of the directories of the live cd as a subtree to the sdaX mounted partition. What do we need these directories mounted there?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.