Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You have not given enough information to give a definitive answer.
If the problem requires an edit to a configuration file, then all that is required is that the live CD can successfully access the file system on the system to be repaired. Provided that a commonly used disk format is being used, then this should not present a problem.
There can be complications if you need to install a boot loader or access a newer disk with GPT partitioning that an older live CD may not support.
Another complication you may run into is using an 'older' Linux distribution which uses Grub Legacy on a newer distribution which uses Grub2. You should use a distribution which has the same version of Grub even within Grub2, there are different versions. Same for Grub Legacy. You would need to give more details to get help as suggested above.
I have done this a lot of times but you have to realize a few limits. One simple one is that some tools like checking the filesystem may need to be current and properly commanded. Example might be that you want to run a check from the hard drive's version. You may have to copy that command to the ram filesystem and then run it on the exact proper name for the target drive. Many of the tools do work backwards and some work forwards too. Just have to play with then. As noted above grub may have to be exact.
There is two scenarios that I am looking at. First, can I use an older distro of Linux to fix a new one? Second, can I use one distro to fix another?
The specific problem I am facing is that I need to fix a boot problem and need to boot a live CD. I have several, but none for the version that I am using.
I am new to Linux, but not new to installing systems, if that helps.
Other members have given some good advice. I will add that you must be aware of using a new(er) Gnu/Linux on legacy hardware with a a older Gnu/Linux installed. By using a new Gnu/Linux with legacy hardware can cause some issues with required drivers/firmware.
It would also be a problem using a older Gnu/Linux on new(er) hardware. Lack of drivers or firmware would be a major concern. You should try to use at least the equivalent era Gnu/Linux on the system in question. Hopefully the kernels are not to far apart for version levels thus allowing hardware recognition and proper system setup.
You said you are trying to fix a boot problem. If you mean "reinstalling GRUB", you can do that using a LiveCD. But you need to do it using grub on your existing computer. i.e., boot with the LiveCD, mount a few filesystems from the computer you are repairing, chroot into that environment, and run grub-install (or preferably the "setup" command from inside the grub shell) from there. Trying to run grub or grub-install from the LiveCD rather than from your existing computer will take you down a road you do not want to travel. Oh, you can run it from the LiveCD all right, but the results will be less than satisfactory.
I know, I just had to repair a boot problem on an ancient Debian system last week using grub (setup). I used a new version of SysRescueCD as my LiveCD, but ran grub from a chroot'ed environment.
I used a new version of SysRescueCD as my LiveCD, but ran grub from a chroot'ed environment.
That's something I've always been wondering. How close is a chrooted environment really coming to what you'd get if you were running the operating system you are chrooting into? I mean, if you do everything the proper way, including bindmounting /dev /dev/pts /proc and /sys of the running system to the respective locations in the chroot environment and copying resolv.conf. Can you then do everything you could have done if you had successfully booted into the target system?
I would imagine that some hardware might be detected in different ways even if you were only running different kernel versions (as opposed to even different distros, which would typically imply kernels compiled in different ways...). And I am guessing there is a ton of other things that I can't think of right now that might behave unexpectedly. I personally prefer to fix installs using live systems of the same distro / release. Except if you really only need to fix a config file, but I might be totally wrong with my concerns in that respect...
I imagine there could be issues if you were doing something complex like trying to play multimedia files using specialized audio and video in a chroot'ed environment using a different kernel. But for every "repair" I've needed to do, chroot has been just fine. Usually you don't even need to chroot for the common repairs. Which is exactly what snagged me initially when I tried running grub (setup) from the LiveCD. But I rapidly figured out my error and did the chroot, leading to a successful recover of grub.
You can also use SysRescueCD (and I suppose about any LiveCD) to boot right into your non-booting computer (albeit with the kernel from your LiveCD rather than you normal kernel).
Below is a tutorial on fixing a corrupted grub using SysRescueCD. It talks about booting directly from SysRescueCD, and how to boot your system using SysRescueCD as a facilitator ("Solution #1"), and also how to use chroot ("Solution #2"). Funny enough, I found this tutorial shortly AFTER I figured out the chroot error on my own. I would have saved myself some time if I had perused the tutorials before I went about trying to fix my problem. Sigh... Live and learn. Always search first. No doubt there is somebody else on the planet who has gotten themselves into the exact same predicament you find yourself in.
Thanks for the assistance. I tried using some of the advice, but I think I will need to give more info to get this fixed.
I am installing OpenSUSE 12.2 on a RAID 1 array. I keep getting the installation done, but the system will not boot. The RAID array is in degraded mode. I got the rescue CD booted and launched yast2. When I got to the the bootloader configuration, I got a message saying "Because of partitioning, the boot loader cannot be installed properly". If anyone has an idea what I'm doing wrong, I would love to hear from them.
I went to Google and searched on your exact text "Because of partitioning, the boot loader cannot be installed properly". Lots of hits came up. Many mentioning openSUSE. I didn't follow any of the Google hits, but that's where I would start if I were you. Good luck!
Ahhh,you should have started with this. "Because of partitioning, the boot loader cannot be installed properly"
Then one of a few issues. Maybe the area needed for grub is already used. One is /boot is not where you can reach it from grub. Many reasons for that. Usually making a single /boot lower in raid will help. Most times your system doesn't have enough support to boot to raid. We may need to know much more about this raid both hardware and software.
Some situations may need a single non-raid partition to put boot.
Also many other people may have good ideas too but let's start with this raid array info.