linux mint wont boot This is a topic that many people are looking for. bluevelvetrestaurant.com is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, bluevelvetrestaurant.com would like to introduce to you How to Repair Linux With Boot Failure. Following along are instructions in the video below:
“In this video. We re going over the common issues that you re gonna run run into on a linux system. So this is one of those things where people issues or they just don t know how to tackle them much like in windows. Where you just don t have a functional bootable system or something happens that s we re gonna cover today in this video for linux because there s many times you ll do something silly.
And then all of a sudden your system old boot and i m just gonna go over the basics of how to recover your system should something go awry. And you need that time shift. Backup or maybe. Let s say you do something in your fstab file in your system will boot properly how to fix that and then just minor grub tweaks you can make on the fly to get to let s say a bash console.
So you can actually go ahead and fix the machine so all these things are what we re gonna cover today just to do a brief recovery on a linux box. Because this is extremely vital that i think literally everyone should know this video is sponsored by cdn 77. A content delivery network chosen by the european space agency and centos. They have over a 14 terabytes per.
Second global network. Real. Time technical. Support and a hundred percent transparent pricing.
And that is just a few reasons. Why hubble images are delivered around the earth using cd in 77. Okay. So the first thing obviously setup timeshift for backups like i m running an arch based system.
Which is manjaro and it s really good. But i know that an update could come along with a new kernel or something that my system wouldn t like and completely crash things. And if i had a backup. It would revert back to that which is awesome so make sure you re doing daily backups.
I like to do at least a week. But always do that if you haven t seen my video on time shift check it out. But with that let s go ahead and break something so i m gonna pull up terminal here and we re gonna change the boot order because a lot of times. You re messing around with external boot devices.
Let s say you re connecting to a samba share. You ll easily jump out there and get that so with all that let s just go. Nan oh et. Cie.
Fstab and we re gonna need sudo for this and from here you can see what the fstab is now i m gonna just take this two terabyte drive and we re gonna do some shenanigans here. Let s say i wanted to type in some extra command. I wasn t aware of i write this out and then i do a sudo reboot. Now this there s a couple things that ll happen here now on the grub screen.
You can launch directly into the actual shell. If you need. But there s also let s say what the error we get when we have a bad fstab. We might be able to get to shell from that way so i m gonna show both methods depending on whatever distribution you re running a mileage will vary.
But you ll be able to at least get one of these methods all right so this is the first method. It says hey unable to mount you can see the failure at the top of the screen here if we read the message. It says you re in emergency mode. After logging in type in journal to view logs bla bla bla bla bla.
So what you do from this screen is just type your root password in to go into maintenance mode. Now we ll go ahead and type root password and now we re in maintenance mode. So we could do a nano edc fstab and fix it from here now what happens if this doesn t work there s a lot of times. I know on some of my bunk.
2 installs that i ve done and i ve had some issues where i couldn t actually get into the shell or even get into anything to repair this we had to go a different tact. So let s go ahead and quit this out we re gonna go ahead and reboot our system. So let s go ahead reboot again now if you didn t get a grub menu. Like i didn t hold shift.
When your computer s booting. So. I hear it going on the background..
I m holding shift right now as soon as i see the bios screen and by holding shift. I should get this so from here. We can go into advanced options and then let s say we want to edit this kernel. So we can go edit.
Kernel and if we come down to this line now. Which line is it how do i edit grub all these things this is the one tip. I can show you look for the line. That says vmz li in uz or lineage and basically what this does is we can change a bunch of stuff so i got a ton of different stuff happening on this yours is gonna look something more along this line.
So with this i can actually edit and do it now. This isn t a permanent edit. This is just a one boot edit. So i want on initializing.
The system to just go into a bash shell. This is what yours is gonna look like right when you hit the e button. So when you scroll down to the kernel you re launching into and you hit e to edit. It you get this.
So you go down to the vm li. Nuz go to the end here make sure. There s a space between the in and then type in it. Equals.
Bin. Ford slash bash. Just like that that is what you need and then we re just gonna hit control x. And what this does is it ll loop basically boot directly in with the bash.
Shell. Now it didn t launch system d. It didn t do any of that stuff. No with this i actually i m using a wireless setup.
Here and it s having problems so i m gonna actually have to go back to the machine and hardwire keyboard in because of some issues. I have with this setup. But for you you should have the ability to just type directly in here and if not it s always good having a wired keyboard laying around so with that i got this old school wired keyboard. We re gonna plug in real fast should you have a driver issue or a wireless keyboard doesn t work always good to have a little five dollar keyboard laying around so this is where we just type nano et cie or slash fstab.
We d come down to where this is and we ll just go over to this command. Delete. The shenanigans. We caused.
Ctrl o. To write out enter to save ctrl x. To exit with those we now have a functional system now i m gonna hit reboot but you re gonna see what happens we literally didn t launch any system processes this just dropped us right into shell with very minimal access to things. So.
By doing this. There is no demon basically launched to even do a report or a shutdown or a reboot or any of these things all of them are pretty much you have bare minimum access. Which is great because we can add it a lot of our system files directly. But you do have minimal system functions.
As you saw my wireless keyboard wasn t working and we can t even reboot the system. But we can edit that file that we need so with that i m gonna hard reboot and let s see if it launches in wallah. There we go we re back in so we ve prepared our fstab. I wanted to show those two methods just doing the init equals bin bash on your kernel if you from your grub menu and if you don t have a grub menu.
And it s running silently remember holding shift makes it appear on startup. So important note there when just doing an easy edit grub now again when you ever you hit e from the grub menu. That s just a one time edit. As soon as you reboot once more that ll completely clear out whatever changes you make so with all that we re pretty much done with fixing an f stab.
But let s say you have something more serious happens and you can t even launch into your thing or let s say you go to boot. And all you are presented with is a black screen that s it just a giant black screen no graphic user interface or anything this is what s probably like a bad video driver or something of that nature. You can hold..
Ctrl. Alt. And press. F1.
Or ctrl. Alt. And press. F2 and drop to tty.
And from here. We can just sign in and we can get to our shell and edit. And do whatever we need to do so if you re missing. Nvidia drivers you could go ahead and use your package manager whether if you re on debian or arch.
You could just go ahead and grab those there s also time shift you can do now i ve already mentioned time shift at the very beginning of this video. But let s say you re at a shell and you re like oh crap. I installed a bad driver. I can t even get my graphic user interface up how do i use time shift.
So if we do time shift help it ll kind of gives us a listing of time shift of other syntax remember the help that s always super important if you ever need information on a command. So time shift help we can go time. Shift lists and we need to be running a sudo to do time shift of course. And it shows all my available.
Restore points. So our latest restore point was earlier today at 3 o clock. This was number seven on the list. So what we could do is restore to that so if we just do sudo time shift.
So we ll do restore from pseudo time shift and then it says hey. Which one do you want to restore and then you just simply say i would want number seven and then hit enter or in for next in the new go through and pull through all your settings revert everything back to how it was and do it from here now i would love to show you this. But i don t want to completely wipe out my system and reload from this snapshot. Just know that this is how you do it just make sure you follow the prompts here and you won t get lost.
And it ll be fine. I ve used this many times actually i think when i made the bedrock video better at clinics and it completely messed up my whole system. I did this exact same command and restored it using back to my vanilla debian installation that i had so it s kind of cool that you can use time shift from the command line. But from here.
There s only one more command. I want to show you and that s chroot. So let s say you do not have a bootable disk or you re not able to do it now if i go into my downloads folder. I ve already downloaded the arch linux iso and if i do a sudo fdisk l.
You ll see i actually have a old s dc s and sandisk extreme thumb drive. So we re gonna go ahead and flash that iso to it using the command line. So always good to know you don t need that balanced edger or rufus or all these other things to make images. We re gonna go old school how it s always been done how it always works and it s just great doing it this method so we re gonna go deedee for the the device and we re gonna just go input file.
Which is i f. Equals and we ll put arch linux is oh. And then oh f. Is the output.
File. Equals. And then this is. Where we.
Put. Dev. S. Da.
See now or sdc. Oh. Man..
If i put s. Da. That would have been a really sad day. Yeah so from here.
We can just simply write this out using this section. Now you can also add different block sizes and other things here some people like to do like a for megabyte block. However. This is the basic syntax.
So let s go ahead and hit enter and make sure you do it as sudo. So this will go ahead go through wipe out that thumb drive because right now. I think admin jarrah loaded on it load arch linux iso directly on to sdc okay. There we go it wrote about a half an egg.
There took about 20 seconds. So really fast easy way to do it and from here. We ll go ahead and sudo reboot into this alright. Let s see if i can catch the startup.
Here and f11 is my boot menu f12 is my boot menu inside so mileage will vary on your f. Key and then we ll just select our usb sandisk that s what we ve had and then we have that arch linux that we just basically burned using ddd so we re gonna boot into arch linux that s this guy we re gonna boot directly off of here. Now this says like hey the system s completely busted. You can t do anything with it time shift didn t work and but you know there s just something you d done on your boot file or something of that nature that you think you can fix you can always use what s called chroot and i ll show you that now this logs in it s running basically at a live environment off of the usb.
But we actually want to go hop over to our main drive. So let s go ahead. And do that f disk. L.
Again. We re gonna see ok. Which one is this i know it s not the 2 terabyte drive the actual linux file system. If we look there you ll see the linux file system is on s db2.
And it is uefi install you can see with the efi system. There so those two things i know hey that s the drive. So linux file system is s. Db.
So. Let s go ahead. And mount. That.
Mount dev s. Db. To 2 m. And t.
And then we need to also mount our efi boot system. If you re messing. Around with boot. You can go.
Mount. Dev s. Db. One m t.
Boot. And from here. We can go into mt and take a look at all our our files. Now we could change something directly in here.
But let s say we wanted to actually operate as the system and start running like let s say install commands and things of that nature using that now we can just go. And do what s called a chroot chroot mnt. So from here..
We are actually running in this installation. Now running directly in the system here. Let s say there s a certain package. We installed that messed everything up we could do pac man qe and it kind of lists all the files or let s say calc was in the name.
We can grep. Calc and then it ll say kcal cool. Let s say you know it could be anything here. But these are all the things that are installed on this installation.
I kind of want to do something in here just to show you the power of chroot. So let s see if there s something that i can remove out of here that i don t really use that would be kind of cool to just go ahead and take out okay. I see screen fetch in here. So.
Let s go ahead and remove screen fetch let s pretend screen fetch was causing those problems and when we do a our screen fetch say do you want to remove these packages and we ll say yes. Then we can just simply do exit. You mount all this unmount all of our stuff that we ve mounted. We we mounted all that we want to make sure they re gone and then we can do a reboot and what this does is it ll go ahead and remove that package without ever actually having to boot to this installation just to kind of show you the power of a chroot.
Okay so we re back in our instance. Everything s fixed and going. And if we look here we can do a pac man qe. And that s grep screen to see if it pulls up anything as you see screen fetch isn t on here anymore.
We actually uninstalled screen fetch so that s kind of a cool way to like let s say remove packages. Even on a non functional or non bootable system you could see it root in remove the packages that are causing problems or install packages that might fix your problem as well so just as another tool for your arsenal. But it s already gone a little too long on this video. I just wanted to show some of the basic ways to go ahead and fix linux installations.
This is extremely valuable especially in the server world so many times you ll run into an old server. That hadn t been booted and you know ten years or something crazy. And you ll be like oh ok. I need to actually get in this and see what s up and that s where you boot from your live media.
You could chroot into that install and see if maybe you could run a update or even a repair on that and see if a what you can figure out kind of a powerful tool. But at the very least if you re using it for desktop. You should have your time ship back up run your time shift you could chroot in and then just run time shift from there and restore to it as well so again see it routes super powerful in both those instances. So there you go the head is recovering your system in a grub machine.
I absolutely must know these types of things with without them i wouldn t be able to recover. Many linux systems. Because i ve made all these errors and literally sometimes i m sitting there scrounging around trying to find these solutions on the fly. And that s not the time you want to be researching this type of stuff.
You should just know it right out of the gate. It ll save you so much time because when this happens in let s say a production environment. You have a lot of stress and other things going on it can be a lot harder to fix where if you re doing it right now. In a test environment.
You know about it ahead. And you see this type of thing. It s just literally going from a couple hours down to seconds. Which is awesome so remember these recovery techniques they re vital to recovering pretty much any linux installation.
But with all that said. Let me know your thoughts down in the comment section. Below and a big shout out to all my patrons. Without you i couldn t make videos like this one.
And i ll see you in the next. ” ..
Thank you for watching all the articles on the topic How to Repair Linux With Boot Failure. All shares of bluevelvetrestaurant.com are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.