Page 1 of 1

[SOLVED] Help with Grub

Posted: Fri May 04, 2012 9:54 am
by Scott65
Hi.

I've gotten pretty far on my own, but now I'm stumped. lol

I had a dual boot system and wanted to delete Win7 and have Linux on a much larger partiton, (the old Win7 partition) so after searching around, I ended up using gparted and deleted the Win7 / etc. partitions, and set up a new ext4 partition and an 8GB part. for Linux swap, then copied Linux from the smaller partition to the new partition.

I booted up and ran sudo update-grub and it found the Linux 12 Lisa partition etc. And it boots up from the new partition fine. I'm working on it now.

However, the grub menu still shows Windows 7. And, I cannot access the original Linux partition. (same mount point as sda1 "/") So I get it that I have to change the mount point to... something... dev/sda5 or whatever(?)
I might install LMDE12 on i,t so maybe I won't have to worry about that...

But what I want to do is update the grub menu.
I ran sudo grub-mkconfig, and it displays what looks to me like a good file--- no Windows 7 boot loader listed-- but where to I write the file? And how do I set it up?

Thanks for any help.

Re: Help with Grub

Posted: Fri May 04, 2012 10:18 am
by wayne128
Boot computer with Live DVD/CD.
Open a terminal, type two commands and post their results:

1. sudo os-prober
2. sudo blkid

Re: Help with Grub

Posted: Fri May 04, 2012 12:00 pm
by Scott65
Thanks for the help wayne:

mint@mint ~ $ sudo os-prober
/dev/sda1:Linux Mint 12 Lisa (12):LinuxMint:linux
/dev/sda6:Linux Mint 12 Lisa (12):LinuxMint1:linux
mint@mint ~ $ sudo blkid
/dev/sda1: UUID="7c9fd79c-7395-4e68-93e8-9c1523456cef" TYPE="ext4"
/dev/sda6: UUID="7c9fd79c-7395-4e68-93e8-9c1523456cef" TYPE="ext4"
/dev/loop0: TYPE="squashfs"
/dev/loop1: LABEL="casper-rw" UUID="b1aad8c2-869b-e44f-bbeb-b858c125e5cd" TYPE="ext2"
/dev/sda2: UUID="6f883ec6-d86c-42cf-8a0c-9faa97b1bc36" TYPE="swap"
/dev/sda7: UUID="96ccf398-344b-4852-af90-48c4f00c8315" TYPE="swap"
/dev/sdb1: LABEL="PENDRIVE" UUID="14E7-3023" TYPE="vfat"
mint@mint ~ $

sda6 is the original Lisa, sda1 is the copy. They both have the same mount point "/". (Same UUID.)?
sda2 is the new swap I made. sda7 is the old swap.
(I booted from a USB stick. sdb1
I would guess the loop(s) are the persistence file on the stick drive?)
I'm trying to learn as I go...

Re: Help with Grub

Posted: Fri May 04, 2012 7:15 pm
by wayne128
Scott65 wrote: sda6 is the original Lisa, sda1 is the copy. They both have the same mount point "/". (Same UUID.)?
sda2 is the new swap I made. sda7 is the old swap.
(I booted from a USB stick. sdb1
Yes, they both have the same uuid because you use gparted to copy old partition to new partition :mrgreen:

Now you really no longer need sda6, that was your original plan, copy small partition to a new large partition.
Do not run with two of the same uuid partitions. something will become funny later.

So you should run only on new partitions, that will be sda1 / and sda2 swap.
Here is how to do properly:
1. boot and run from Live DVD
2. run gparted
3. use gparted to delete sda7
4. use gparted to delete sda6
5. sudo os-prober, you should check that now there is only sda1listed like
/dev/sda1:Linux Mint 12 Lisa (12):LinuxMint:linux
6. cat /etc/fstab to confirm that both sda1 and sda2 have the same uuid as your earlier post.
7. next is to mount the sda1 partition
sudo mount /dev/sda1 /mnt
8. and install grub to MBR
sudo grub-install --root-directory=/mnt /dev/sda
9 you should read that no error, if there is error, copy them and paste here.
10. reboot and see what happen.

Re: Help with Grub

Posted: Sat May 05, 2012 7:45 am
by Scott65
I'm going to post this for the record... I had to use gparted to turn the sda7 swap off before it could be deleted.

-----------------------------------------------
mint@mint ~ $ sudo os-prober
/dev/sda1:Linux Mint 12 Lisa (12):LinuxMint:linux
mint@mint ~ $ cat /etc/fstab
overlayfs / overlayfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda2 swap swap defaults 0 0
/dev/sda7 swap swap defaults 0 0
[Note-- no UUIDs listed... so I ran the other command]
mint@mint ~ $ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/loop1: LABEL="casper-rw" UUID="b1aad8c2-869b-e44f-bbeb-b858c125e5cd" TYPE="ext2"
/dev/sda1: UUID="7c9fd79c-7395-4e68-93e8-9c1523456cef" TYPE="ext4"
/dev/sda2: UUID="6f883ec6-d86c-42cf-8a0c-9faa97b1bc36" TYPE="swap"
/dev/sdb1: LABEL="PENDRIVE" UUID="14E7-3023" TYPE="vfat"
[and it has the UUIDs. Then this:]
mint@mint ~ $ sudo mount /dev/sda1 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda
grub-probe: error: cannot find a device for /boot (is /dev mounted?).
Installation finished. No error reported.
mint@mint ~ $
[grub-probe error-- then it says Installation finished, No error...????]
I'm going to try to reboot now and see what happens.

Re: Help with Grub

Posted: Sat May 05, 2012 8:00 am
by Scott65
When I rebooted the grub menu still had the sda6 partitions listed. So I ran sudo update-grub and it fixed the menu.

Thanks wayne.

Now I want to install LMDE on the sda6 partition... :)