LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 07-30-2013, 12:32 PM   #1
Theseus
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: Disabled
Can one version of Linux be used to fix another?


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.
 
Old 07-30-2013, 01:25 PM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,430

Rep: Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349Reputation: 1349
Welcome to LQ!

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.
 
1 members found this post helpful.
Old 07-30-2013, 01:31 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
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.
 
Old 07-30-2013, 03:48 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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.
 
Old 07-30-2013, 03:51 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
knoppix was designed to be a live-cd or live-usb to fix issues with other (linux and non-linux) operating systems.
 
Old 07-30-2013, 04:20 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Member Response

Hi,

Welcome to LQ!
Quote:
Originally Posted by Theseus View Post
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.

Hope this helps!
 
Old 07-30-2013, 05:46 PM   #7
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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.
 
Old 07-30-2013, 06:36 PM   #8
joe_2000
Member
 
Registered: Jul 2012
Location: Aachen, Germany
Distribution: Void, Debian
Posts: 808

Rep: Reputation: 216Reputation: 216Reputation: 216
Quote:
Originally Posted by haertig View Post
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...
 
Old 07-30-2013, 11:40 PM   #9
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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.
 
1 members found this post helpful.
Old 07-30-2013, 11:51 PM   #10
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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.

http://www.sysresccd.org/Sysresccd-P...a-damaged-Grub
 
Old 07-31-2013, 10:18 AM   #11
Theseus
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-31-2013, 11:40 AM   #12
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,115

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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!
 
1 members found this post helpful.
Old 07-31-2013, 03:11 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,870

Rep: Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249Reputation: 1249
Quote:
I got a message saying "Because of partitioning, the boot loader cannot be installed properly"
It would be pretty difficult for anyone to assist you in this instance as you have posted no information on your partitioning!
 
Old 07-31-2013, 03:50 PM   #14
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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.

Last edited by jefro; 07-31-2013 at 09:30 PM.
 
Old 07-31-2013, 04:15 PM   #15
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
Longshot,
only skimmed over what has been suggested thus far.

What kind of partitions do you have? GPT?

You may need to use gdisk to correctly format "BIOS boot partition" , usually the last 1MB of disk.

Some info here
https://wiki.archlinux.org/index.php...loader_Support


Mostly a guess, as I have not much to "work with"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will version upgrade fix like re-install? widda Linux - Newbie 5 01-22-2010 04:53 AM
New src2pkg bug-fix version gnashley Slackware 29 01-08-2010 03:56 PM
problem with new version of Xorg, how to fix? bluecog6 Linux - General 7 12-29-2008 08:33 PM
How can you roll back to a previous version 7.10 of Kubuntu or fix 8.04 twlaaas Linux - Newbie 3 05-02-2008 01:58 PM
src2pkg bug-fix version gnashley Slackware 7 03-19-2008 07:22 PM


All times are GMT -5. The time now is 05:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration