(SOLVED)Help, Tried to install 2nd copy of Linux and now I cant boot 1st copy
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!
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.
CraP!!!!!!!!!!!!! I am soooooooo frustrated right now!!!!!!!!!!!!!
I cannot run bootinfoscript (keeps saying its not there when it is)(I ran it from a livecd last time and I think thats why everything is off). I dumped the file in root and ran terminal from cent6 bootup.
I cannot edit grub.conf ( I dont have enough knowledge to move around and run things). I dont know the commands. I dont know the paths. I dont know how to do anything!!!!!!!
I cant do anything! The f'ing machine is so locked down I cant pick my nose without being in the "sudoers" A list.
Its 15 steps to do one thing and I dont know how to do ANY of the 15 steps. Even when I try the step it complains something is wrong and I dont know how to fix it.
*&&%^$#^%$$#@
I am basically like a little kid when it comes to linux and I do not have enough skill and knowledge to even do the simplest things.
I am stuck at zero and cant do anything you asked
The menu.1st file wont open (I dont have permission when I click on it) and I dont know how to edit it from term.
Your bootinfoscript, for some reason shows only one drive and that shows as sdb rather than sda. The two options I posted earlier, one with the core.img entry and one a chainloader entry, should have been put it the grub.conf file for CentOS which is displayed in the output from bootinfoscript. Did you run the bootinfoscript from CentOS? I don't know why it would show both Mint and CentOS on sdb?
The Mint installation shows as being installed on sdb1 and the CentOS boot partition is sdb3. If you boot CentOS and can access the Mint partition, look in its /boot/grub/ directory to see if there is a core.img file. There should be but, if not use the chainloader entry and change it to:
There is no core.img file on CentOS, it is ony on systems with Grub2. You seem to have only one hard drive so it's a bit confusing that your output shows only an sdb drive unless you ran the script from a flash drive. Another problematic thing is that the grub.cfg file for Mint shows it on sda1. Delete the grub.conf file you created on Mint, it won't do anything.
So how many drives do you have? Did you run the script from CentOS? How did you install Mint, CD/DVD or flash drive? Did you have another drive attached during the install of Mint?
Also, Mint is not using Grub Legacy. You can see the Grub2 files in the output. CentOS does use Grub Legacy but there is no reason you should not be able to boot Mint with it.
I have 1 500g HD inside the laptop
I originally ran bootscript from a live cd as I could not make it work from the HD, it refused to run as I am not a linux god or something.
I installed mint and c6 from a livedvd.
No other drives are attached.
Boot from a Mint/Ubuntu live cd. The Centos6 cd won't work. open a terminal and enter the following:
Code:
sudo fdisk -l
From the output of it you should be able to determine if mint is on /dev/sda1 or /dev/sdb1. Then
Code:
sudo mount /dev/sda1 /mnt
if mint is on sda1 otherwise it will be /dev/sdb1. Then
Code:
sudo grub-install --root-directory=/mnt /dev/sda
as before change sda to sdb if needed. Then
Quote:
sudo update-grub
reboot and if everything works you should see a grub menu with mint and centos. If you don't have a centos entry rerun update-grub after booting into Mint. This is based on your info script and this http://community.linuxmint.com/tutorial/view/245
Last edited by colorpurple21859; 02-17-2014 at 09:47 PM.
And as always its 15 more steps as I just figured out I dont have any printers installed and NO PLACE IN CENTOS6 is there a way to install printers. I really hate centos6 its just been a nightmare. I was cruising along just fine in newbie land with Mint and loving it. Now Im ready to paint my brains on the wall....BAM (just kidding, dont call the swat team please, I love my dog)
Now Im ready to paint my brains on the wall....BAM (just kidding, dont call the swat team please, I love my dog)
Know how you feel, been there several times with linux.lol If you can connect to internet with live cd then you won't have to try to remember all this, otherwise write the above commands down.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000c356b
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 485378047 242688000 83 Linux
/dev/sda2 972599294 976771071 2085889 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda3 485378048 486402047 512000 83 Linux
/dev/sda4 486402048 972597247 243097600 8e Linux LVM
/dev/sda5 972599296 976771071 2085888 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_root doesn't contain a valid partition table
Disk /dev/mapper/VolGroup-lv_home: 191.0 GB, 191012798464 bytes
255 heads, 63 sectors/track, 23222 cylinders, total 373071872 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_home doesn't contain a valid partition table
Disk /dev/mapper/VolGroup-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders, total 8257536 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap doesn't contain a valid partition table
mint@mint ~ $ sudo mount /dev/sda1 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda
grub-probe: error: failed to get canonical path of /cow.
Installation finished. No error reported.
mint@mint ~ $ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of /cow.
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda1
grub-probe: error: failed to get canonical path of /cow.
/usr/sbin/grub-bios-setup: warning: File system `ext2' doesn't support embedding.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.
mint@mint ~ $
Is there any way to do a repair install of mint to the same partition and fix things?
Why is LVM not a valid partition and why is it full with zero free space?
What I did.....
Had Mint-petra on 500g hd all by itself
Installed Cent6 onto drive.
Cent asked if I wanted to resize drive and I said yes and split it into 2 pieces (231gigs each by resizing).
Installed c6 to now empty 231g space
The rest is history.....
Before you go re-installing anything, remember that your /home on the Mint system is not on an independent partition and could be damaged if things don't go well. If you have a way to mount the Mint partition, I would do that and back up anything of importance to an external drive or USB stick before you go further.
Once done, you might use your Mint install disk and see how it's partitioner sees the LVM setup. If it sees it as a valid Linux system, you might get by with installing nothing but grub, and leaving the rest of your Mint and Centos installations intact.
If the Mint partitioner doesn't recognize the LVM, then it may be better to delete it and reformat it as a normal extended partition, which can be sub-divided as you see fit. If you re-insall Centos, pay close attention to what grub wants to do. If you want to keep the Mint version of grub intact in the MBR, you could order Centos to install it's grub on the Centos root partition, rather than the MBR. Be warned that Centos won't boot until you boot back into Mint and add a "chainloader" section to it's grub setup to go to the Centos grub.
Just a note on partitioning. A separate home partition has many advantages. During an install, you simply tell the partitioner to use the existing home partition as /home, and not to format it. Then your documents are safe. When dual booting two Linux systems, it's possible to share the /home partition, but not your home directory. For example, if your user name is FMCDH, then during Mint install, your user name should be FMCDH-Mint and Centos would be FMCDH-Centos, so you end up with /home/FMCDH-Mint/ and /home/FMCDH-Centos/. The problem with having only /home/FMCDH is that both systems would be trying to use the same config files within your home folder.
Here is a quick example of what a new partition scheme for your setup might be:
/dev/sda1/ mounted as / (Mint root) 20GB
/dev/sda2/ mounted as /home/ (Both Mint and Centos) 450GB
/dev/sda3/ Extended Partition 30GB
/dev/sda4/ mounted as / (Centos root) 20GB
/dev/sda5/ mounted as swap (Mint) 5GB
/dev/sda6/ mounted as swap (Centos) 5GB
Of course, the best hope is that the Mint install disk will recognize the Centos LVM and you won't have to go through all that effort.
if not, try this way. I know it is a lot more typing but may be a better option.
Try it this way from terminal using the mint cd
Code:
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
mint@mint ~ $ sudo grub-install -f /dev/sda
grub-probe: error: failed to get canonical path of /cow.
Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
mint@mint ~ $
The second part of what you typed (plan B) took and I had "no errors". Going to reboot now.......wish me luck!
Quote:
Originally Posted by colorpurple21859
Using the -f or --force option might work
Code:
sudo grub-install -f /dev/sda
if not, try this way. I know it is a lot more typing but may be a better option.
Try it this way from terminal using the mint cd
Code:
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Then reboot
You may have to do this to get Mints grub to install as per purevw using gparted from the live Cd. If you do delete the lvm you will need to create another swap partition.
Well like a kalashnikov it worked, thanks so much!!!
Wow 4 days of HELL trying to get up and running again. Drinks or burgers on me, send me your PP address (really!).
I have several observations/questions:
1.) WHY THE F**K didnt Cent6 know there was a second copy of linux there and do a dual boot to exists with mint?
2.) There are too many "versions" of linux and commands are different, help is different, just a real pita!
3.)I like linux when its running but when its broke its a holy living nightmare to fix (for a new guy).
4.) I just had to repair a buddies win7 machine (nasty virus) and it took 3 hrs but I fixed it and its 100%. I do not miss the virus and malware nonsense one bit!
5.) Is there like a newbie 101 handout somewhere so I can be a little better at this?
Moving forward..........
How can I fix my f**ked up hard drive now? I want to remove the c6 damage and return to one monolithic 500g mint only HD.
Thanks again for the help and getting me up and running!!!!
1.) WHY THE F**K didnt Cent6 know there was a second copy of linux there and do a dual boot to exists with mint?
Because CentOS uses Grub Legacy. Just for your information, if your situation had been reversed and you had CentOS already installed and then installed Mint with its' Grub2 bootloader to the master boot record, you would have had a menu showing Mint and CentOS. Because the newer Grub2 can do things that Grub Legacy can't. Also, the two boot entries I suggested in my initial post (with the core.img or chainloader) will work booting a system with Grub2 FROM a system with Grub Legacy. I use Grub Legacy and boot other systems with Grub2 with both of the entries. I can install a different system using Grub2 on the same partition without making a change to either boot entry and the systems boot. If you want to boot a system with Grub2 from a system with Grub Legacy, you usually need to create the entry manually.
Quote:
There are too many "versions" of linux and commands are different, help is different
I agree with the first part of your observation but that's a result of it being open source and free so anyone with the time and effort can create whatever. Commands are basically the same for all Linux systems. They are different for systems which use sudo as opposed to those which do not as well as different for Grub Legacy and Grub2. It's different software that does primarily the same thing. There are also too many different types of automobiles, not to mention too many different printers.
Quote:
How can I fix my f**ked up hard drive now? I want to remove the c6 damage and return to one monolithic 500g mint only HD.
You can boot the Mint CD and open GParted from a terminal (just type gparted in lower case). If you haven't used it before, click the various tabs at the top so you know what's available or read some tutorials online. Delete the CentOS partitions and then resize the Mint partition to take up the whole disk. You could also just format the CentOS partitions from Mint and create data partitions there. Make sure you get the correct partition so you don't delete Mint. Below is a link to a tutorials for GParted.
I think if you just delete sda3 and sda4 only will get rid of the lvm without loosing you swap partition, which is located on an extended partiton.
Unless I'm mistaken the core.img entry with grub legacy won't work unless grub legacy is fixed with a patch to boot ext4, and according to what I was able to google centos grub legacy isn't patched. The chainloader entry should have worked with grub legacy, however I have came across some situations where chainloading to ext4 with grub legacy just doesn't work.
Last edited by colorpurple21859; 02-18-2014 at 03:29 PM.
So I should not do anything? Last thing I want is a dead laptop again or a nasty surprise on reboot. I do not have the skill to fix an issue without help. Is there a way to "simulate" the 2 partitions as gone/deleted?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.