Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Chat about Linux in general
Post Reply
LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Sat Jan 05, 2019 2:14 am

Note: Read through the whole thread:
Ok really wasn't sure where to put this. So I guess it's here but let me describe the situation. Odd but here goes.

Ok so I started a long time ago with LM10, still really like this distro and community and occasionally return just to see where it's at or dork around in the forums. I installed LM 19 Cinnamon but even checking the box for enable proprietary software in the installer wouldn't get my problem Broadcom wireless card working. At the moment I only have wifi (no wired) access, so this left me with an LM operating system that couldn't connect to the wifi here, no internet !!! :(

To fix this I turned to a great and powerful method of fixing problems with an ailing gnu/Linux install. Works for a dizzying array of problems and guarantee used with common sense can save a nixer massive amounts of time + pain, in fixing a broken install they cant boot normally.

You can reinstall a bootloader, edit files ( to fix them if you've messed them up.) Install, remove, reconfig or fix broken software packages. Tons of stuff you can do with this, so here goes.

Not going to reinvent the wheel, I've done this many times before. To fix my problem, I used a different distro in live session to chroot and install the software LM 19 was missing. In this case it's a Bunsenlabs linux iso, which supports my problem wireless card out-of-box. I downloaded the iso from their site and for convenience followed this how-to, as noted in some of the other posts in that thread (BLizgreat! is my username on that forum.) I didn't need to install the debootstrap package while in BL live session to get this to work and also note the tip about using Ctrl + D to exit the chroot prior to rebooting after I'd installed the packages I needed to the LM OS.

While running in live session with the Bunsenlabs iso. I installed the binutils package to it with ...

Code: Select all

sudo apt-get update && sudo apt-get install binutils
Note: Not sure it's even needed, to do as I'm describing the debootstrap package wasn't but why not include this anyway just in case.

Ok wanted to see which kernel module I needed, that was loaded in the BL's iso live session, I was missing in LM 19, did so by popping open a terminal in the BL live session and using the cmd "lsmod". In my case for this problem card it was using the b43 module. Ok so next up what packages were present in the BL iso (live session) related to the b43 software I needed, found this with "dpkg -l |grep b43". It listed out several ... ok. So followed that how-to, chrooted my LM install on sda7 and searched the LM software repositories for the b43 packages I was missing with "apt-cache search b43".

In my case turns out I needed the following and these are the one's I installed while in BL live-session.
ii b43-fwcutter 1:019-3 i386 utility for extracting Broadcom 43xx firmware
ii firmware-b43-installer 1:019-3 all firmware installer for the b43 driver
ii firmware-b43legacy-installer 1:019-3 all firmware installer for the b43legacy driver
While chroot'ed in the BL live-session installed them with.

Code: Select all

sudo apt-get install b43-fwcutter firmware-b43-installer firmware-b43legacy-installer
That's what it did, installed them to LM 19 Cinna. Extracted and installed the driver I was missing for my problem wireless card, which is for the following.
Broadcom Limited BCM4312 802.11b/g LP-PHY
Just for the sake of being thorough in case someone else has this issue. After doing this, I used "Ctrl + D" to exit the chroot in the BL live-session and then rebooted the system with "sudo reboot".

Everything's working great "lsmod" shows the b43 wireless module loading as expected to support my wifi, so am happy and typing away right now on LM19 via wireless connection.

Anyway, there is plenty of info on chroot via live session, know others that work fine too but for convenience did this one, trust the guy who wrote it and just verified 100% works as described here, so rather than rewrite or compile a massive chroot how-to, just linked to it. Also note, if you have more than one gnu/Linux install on a system and one breaks, you can also chroot and fix that broken install from the working OS on that pc. Not going into that just noting it.

Also just to state the obvious, here I used a Debian Stable based iso (Bunsenlabs) to fix a LM 19 OS installed. Have also done that many and for a long time. ie: Used xyz-iso to save a messed up Arch install I'd messed, or an Mint iso to save a borked gnu/Linux Arch install. Chroot is a very powerful, kickbutt and versatile way to fix a broken Nix operating system. Without having to reinstall or restore a backup etc.
Last edited by LuvNix on Tue Jan 08, 2019 11:15 pm, edited 4 times in total.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Sat Jan 05, 2019 2:30 am

Oops, though not necessary do tend to advise going ahead and using the iso for the distro you have issues with, if you've got one handy. In this case, LM19's iso didn't support wifi-card and Bunsenlabs iso did. Needless to say, also strongly suggest someone puts and keeps in a place an incremental backup/restore plan for their data and OS's ( local AND/or remote ... as in storing a backup somewhere secure online, on a usb drive ... both, whichever.) Also just to note gnu/Linux under the hood is so much the same anyway, while can be util + app or command changes when dealing with radically different distro bases.

Ie: With all Debian based ( there's a gazillion + will work with Ubuntu(thus LM) and others. The commands, utilities and methods are so similar really doesn't matter which is involved. Verses chroot'ing a Fedora install with a Debian based, still no problem but you will need to be reasonably familiar with working with Fedora based systems and which commands-etc (ie: using yum or graphical front-end for Redhat stuff, CentOS etc or pacman for Arch, installing software onto that system etc to get er done. Still massive similarities but are variances you'll want to know involved perhaps.

Alright ... that's it, HAPPY CHROOT'ing fellow nixers !!! :D

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Sat Jan 05, 2019 10:34 pm

Random (and mostly pointless ) update:

Although wifi and card were working, being overly anal about such stuff, ran the cmd "journalctl -p 3" and some complaints related to missing firmware for the wireless card was in it. Probably nothing to bother with anyway and wifi was running fine anyway but checked on a BL hybrid I've got on the system as mentioned uses the b43 kernel module/driver for the wireless card and it didn't have the same error, so went ahead and fixed it real quick by upgrading to the wl module instead.

Did so with "apt-cache search broadcom |grep dkms" to search for source packages related to broadcom, source files that dkms ( < Which is installed default for LM 19 Cinn) This package which is the one best for this wificard anyway, the one I needed popped up.
broadcom-sta-dkms - dkms source for the Broadcom STA Wireless driver
Installed with apt-get as per examples above and that's what dkms did, built and installed the driver/kern module I needed and it automatically ran "update-initramfs". Rebooted, checked which wireless module the Minty OS is using (lsmod), yep the wl kernel module had replaced b43 and then checked the journalctl for errors again, gone and done. :D YAY !

Only 55 forum folks have read my droning on about Chroot magic ?!??!?!?! Arghhhhhh, oh well those who didna, it's their loss. :D

User avatar
Portreve
Level 8
Level 8
Posts: 2008
Joined: Mon Apr 18, 2011 12:03 am
Location: Florida
Contact:

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by Portreve » Sun Jan 06, 2019 2:07 pm

All of the above information you've shared is very interesting and potentially useful, and I'm sure I speak for others here when I say "Thank you!" for sharing it.

However, there's some issues.

First off, if nobody's responding, it's probably that nobody has found this post personally relevant. That doesn't mean it wasn't worth your time; it's just that most people's hardware probably falls into the "just works" category.

Now, as someone who's own hardware doesn't "just work" (I have a 2011 13" MBP) there's some further issues with your solution.

Let's first pre-suppose someone has hardware either like you do (WiFi but no ethernet port) or like me (ethernet but not OOB-supported wireless).

If you can't get on the Internet, you can't get on the Internet to read your solution. QED.

Let's suppose a "magical intuition" scenario where someone could know your solution without having access to the Internet to get access to this web site to have read it. How would they then download the distro you refer to? I mean, if you can't get on the Internet, you can't download anything via it, either.

Again, QED.

Now, if there's a means of getting on the Internet (but just not wirelessly) the solution you propose is more of a desperation move in the sense that it isn't clean. You have to muck around with your own installed distro as well as another distro. Believe me, as someone who's been in the technology world since the 1980s, I've seen or had to concoct more than my fair share of desperation-move solutions, so I am not trying to diss on yours.

There was a period of time where I had no Internet at home, and I had to use a local library. Now, I love that library, I love its ethos and all that, but it wasn't always practical to try and get a wired connection there, so here's the solution I used.

I had prior knowledge and therefore was able to skip the first part of this, but someone else who doesn't have prior knowledge could via something else (smart phone? another computer?) google "what wireless hardware is natively supported by linux" and you'd find out that wireless chipsets produced by Atheros are by definition GNU+Linux friendly. From there, it's a simple second step of doing a search for "atheros-based wireless adapters" and one can get (for anything from $10-$20) a USB adapter, such as the one I have, which absolutely will work with any modern GNU+Linux distro.

In writing this post, I deliberately skipped suggesting using a router as a WiFi bridge simply because, in a scenario like yours, you couldn't have used such a solution. However, even though it's pretty common now to see computers with no ethernet port (with ethernet-over-USB then used on those systems) I can't imagine any computer at this point not shipping with USB ports of some description.
I'm so down wit' dat', yo, dass ich unter dem Beton bin.

Presently rocking LinuxMint 19.2 Cinnamon.

Remember to mark your fixed problem [SOLVED].

All in all, you're just another brick in the wall.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Sun Jan 06, 2019 5:06 pm

No worries either way. Kinda confused by what point you're trying to make here. Of course many folks new to gnu/Linux and many potentially long time users aren't aware of this and the gazillion other things chroot ( from live session or by another means or application) can do. That was the point of posting this type of thing. So if someone chooses they can use/learn about it.

Of course if I'd have had wired internet access or a supported usb dongle or whatever, none of this would have been necessary. Didn't (and you don't) need internet access to install a gnu/Linux OS regardless and in my circumstances wasn't an option. The Bunsenlabs gnu/Linux iso did support my problem wireless card out-of-box and as outlined, that's what I used to enable me to fix the problems with the LM 19 ( CInnamon) install to get the wireless working.

Overall ... yeah, knew it'd almost certainly work. Have done the same thing in similar situations. Went ahead and did it to get my Minty OS install online and thought hey, this is a great time to demonstrate chroot from live-session (even with a different distro's iso) to the LM community for anyone who might think it's cool ( IT IS VERY COOL) and worth learning ( IT IS VERY MUCH WORTH LEARNING. :D )

The number of things you can fix with chroot is mind blowing when an ailing gnu/Linux Os won't boot. Plenty of information around the webz, like anything ... no shortage of junk or bad how-to's on it out there too. Wanted to post ( link to) a quality method and example of chroot.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Tue Jan 08, 2019 10:30 pm

Update: Arghhhhh, this approach doesn't seem to work in the Mint v19 ( Mate) release. Something related to /bin/bash in it and haven't messed with figuring it out at the moment. Only needed 1 package to get the dang Broadcom wireless working though (broadcom-sta-dkms), so downloaded the .deb for it online, put it onto a usb and then installed it onto Linux Mint Mate from there.

Inserted usb, transferred the .deb I needed into my user /home. Then selected "Open terminal here" in the file manager and installed it in that terminal with "sudo dpkg -i *.deb"

Note: On above command the */asterisk is a wild card, it'll match any .deb or .deb(s) that are in that working directory. Though the broadcom-sta-dkms.deb was the only one I had in there when I ran that command in the terminal, so it was the only one that got installed. That's what the "dpkg -i" does/did -i is for install. Someone could obviously also install it, whichever .deb(s) you want with something like gdebi too.

Anyway running that command as described, installed the .deb I wanted and dkms built and installed the missing wireless driver ( wl) for my wireless and now typing this on LM 19/Mate. Mentioned haven't bother figuring out what the deal with Chroot is for this release of course the described method worked fine in the LM Cinnamon release. Works fine on a gazillion others too. Arghhhhh and shrugs. :)

Just posting cause it's related/relevant to this nonsense and outlined the "dpkg -i" thing cause it's a cool trick. Though can be a massive pain, when it comes to trying to satisfy dependencies. Am fortunate I only needed 1 package to get wireless in this case, both dkms and wireless-tools were/are already installed out-of-box.

Update: Reason this didn't work on MATE, it was a 64bit install and the Bunsenlabs iso was 32bit.
Last edited by LuvNix on Tue Jul 16, 2019 4:14 pm, edited 1 time in total.

Hoser Rob
Level 14
Level 14
Posts: 5441
Joined: Sat Dec 15, 2012 8:57 am

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by Hoser Rob » Wed Jan 09, 2019 9:09 am

LuvNix wrote:
Sat Jan 05, 2019 2:14 am
Note: Read through the whole thread:
...
If you want people to read your input write it clearly and concisely, beginning with something like the above and then spewing a ton of verbiage just makes you seem pompuous and likely belligerent. I'm done here, 'bye.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Wed Jan 09, 2019 9:16 am

Alright ! My favoritist person in these forums !!! :)

Arghhh, reason I typed that is because as I've been dorking with this and during the process of messing with various Mintness, things have changed or proven to be different in whichever circumstances with Linux Mint. ie: The switch from using the "b43" module to "wl". Both worked fine anyway. Also that this approach using BL's iso doesn't seem to work for whatever odd reason in LM v 19 Mate. Main point is I'm trying to encourage people to actually read through it, so they'll be aware of these things. Not that any way someone were to apply this would cause real harm. Just trying to save time by informing folks to read through all 6 posts beforehand.
Edit: Arghhhhhhhh, by some of that above I don't mean whatever you do with chroot cannot cause real harm. Doing something dumb, ill advised etc while chrooted into a gnu/Nix install can utterly destroy it. Of course someone can do the same, doing similar ( screwing up ) in any OS that's running perfectly too.

LuvNix
Level 3
Level 3
Posts: 127
Joined: Wed Jan 02, 2019 4:50 pm

Re: Installing needed packages for LM v. 19 Cinnamon with Chroot from live usb.

Post by LuvNix » Fri Jan 11, 2019 11:44 pm

UPDATE: ( I hope nobody minds. :) )

Being a dork but do have additional stuff, related to other stuff I've posted in this thread. That being in the Linux Mint v 19 MATE iso, it actually does support my wireless card in live-session. However not in the resulting/finished install. This is likely do to the installer (casper ? don't know if ubuntu/based still primarily use this one) having support for it. So had to resort to transferring the package(s) I needed from usb drive to the ailing Mate OS, install them, to get my wireless working. Haven't tried, thus haven't confirmed whether or not the MATE iso will allow for live-session chroot of a borked MATE install via the live chroot method linked in this stupe thread though.

It may, haven't bothered running down why live chroot as described fails in MATE's install, works in Cinnamon and LMDE3 + a gazillion other distro's, shrugs. Main thing I wanted to point out in this dumbarse thread is the power of chroot, chroot from live-session etc. So hopefully does interest or help someone in the Mint community.

Post Reply

Return to “Chat about Linux”