GURB help - I messed up bad.

Asked by Bruce M.

In a nut shell I messed up bad. I thought I'd try Ubuntu 7.10 (beta) ... big mistake.
After 15hours it was downloaded and about 40 minutes into the "installing process" when it FROZE!

The last line in terminal said something like ...
The list of files you need to (can't remember what was here) are:
... no movement beyond this point ...

After a while I simply rebooted...
I had 7.04 and Win 2000 choices in GRUB.
Win 2000 booted fine.... (80G Hd - Master)
Ubuntu 7.04 booted (40G Hd - Slave) but with restrictions as some of the system was over written with 7.10 :(

OK, I'll dump Win 2000 since I don't want it anyway. Popped in my 7.04 Live CD, and installed Ubuntu to the entire 80G hd, everything seemed to go fine. .... told the Live CD to close down and reboot.

Reached the "if you have a CD in your drive remove it now and hit enter to continue"

Did that and GRUB came up telling me I had Ubuntu and Win 2000 to choose from??????

I just installed Ubuntu 7.04 over Windows.
Tried Windows option ... obviously it didn't start.
Tried Ubuntu ... and I'm back with my damaged Ubuntu (7.04/7.10) on the slave drive.

How can I get GRUB to see Ubuntu on the master drive and "ignore" the Slave drive installation?

Bruce Milmine

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Bruce M.
Solved:
Last query:
Last reply:
Revision history for this message
peter b (b1pete) said :
#1

 Hello,

It'll be advisable to use ubuntu alternate CD that gives you full control of partitions; try to delete the partitions first --> that'll give you a ' clean slate' so to speak (you'll end up with free space) then use either manual or use the entire free space option to install a fresh feisty/7.04.

7.10 is still under development ao I would not recommend an install at this time unless you're prepared to deal with situations that may not be fully tested.

Hope this helps. If any additional questions please ask somebody will try to help.

peter b

Revision history for this message
lwshll (lwshll) said :
#2

try these few links and see if they help u
http://ubuntuguide.org/wiki/Ubuntu:Feisty#Super_Grub_Disk
http://users.bigpond.net.au/hermanzone/SuperGrubDiskPage.html

they help me to fix grum boot screen

Revision history for this message
Bruce M. (canar-ciudad) said :
#3

Hi Peter b ... I don' have an Alternate CD, just the live CD, and I doubt with the problems I'm having that I could even get one.

Hi Iwshll ... I'm checking those sites now.

Will let you know how I make out ....
Thanks for the reply.

Bruce Milmine

Revision history for this message
peter b (b1pete) said :
#4

Hello Bruce,

I understand the predicament you're in. No doubt that a supergrub disk would help. There is another very slick HD/partition mgr/utility at

http://www.terabyteunlimited.com/

that is a very small download and gives you everything you'd need to clean up partitions prior to a fresh live CD install. This utility is free for trial and fully functional.

Keep me posted.

peter b

Revision history for this message
Bruce M. (canar-ciudad) said :
#5

Hi peter b

Saw your response as I came to do this what you see below.
Will check that out now too. Thanks.

Please note: I do not have Windows on my system:

bruloo@The-Team:~$ cat /boot/grub/device.map
(hd0) /dev/hda
(hd1) /dev/hdb
bruloo@The-Team:~$

   and:

bruloo@The-Team:~$ sudo fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 9542 76646083+ 83 Linux
/dev/sda2 9543 9729 1502077+ 5 Extended
/dev/sda5 9543 9729 1502046 82 Linux swap / Solaris

Disk /dev/sdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 * 1 4678 37576003+ 83 Linux
/dev/sdb2 4679 4865 1502077+ 5 Extended
/dev/sdb5 4679 4865 1502046 82 Linux swap / Solaris
bruloo@The-Team:~$

I need to delete GRUB from - sdb (it's my damaged Ubuntu 7.04 >> tried to upgrade to 7.10) (I am using this version at the moment)
then install GRUB on - sda (it should be a freshly installed 7.04) and have my computer boot from -sda- not -sdb-

Bruce Milmine

Revision history for this message
Bruce M. (canar-ciudad) said :
#6

Peter b ...

Checked out the HD partition site you sent ... it's based on having M$ Windozzz :(

Is there a way to delete GRUB from - sdb (it's my damaged Ubuntu 7.04 >> tried to upgrade to 7.10) (I am using this version at the moment) then install GRUB on - sda?

Bruce Milmine

Revision history for this message
peter b (b1pete) said :
#7

Bruce,

I'm fully aware that there is no win. the utility that I mentioned needs neither win nor linux; it is totally independent of any os, it installs itself on its own small partition (approx 8MB) and allows you to do lots of things easily on any HD on the system.

secondly, indeed there are two HD's, each with a
pri part --> sda1 and sdb1 AND
extended part --> sda2 and sdb2 THAT IN TURN
have logical partitions --> sda5 sdb5

The first question is do you indeed need EXTENDED partitions? personally I do not see why they are there.

So, your above post confirmed my suspicions and for this reason I recommended in the first place the delete partitions step -ALL- to get to the 'clean slate' situation that in turn will allow a very easy entire HD (sda) default feisty install off the live CD. Try terabyte utility and make for yourself an easy and pleasant life.

peter b

Revision history for this message
peter b (b1pete) said :
#8

Bruce,

 OK, I'll tell you now how to go about your problem using ubuntu; please note --> I DO NOT KNOW IF IT'LL work on your shaky install. Here it goes

sudo apt-get install gparted
sudo gparted

gparted is ubuntu gui partitioner. After it is up highlight the partition --> right click and do whatever your heart desires. So, delete all partitions and fresh install feisty off live CD.

peter b

Revision history for this message
Bruce M. (canar-ciudad) said :
#9

Hi Pete

bruloo@The-Team:~$ sudo apt-get install gparted
Password:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
bruloo@The-Team:~$ dpkg --configure -a
dpkg: requested operation requires superuser privilege
bruloo@The-Team:~$ sudo apt-get install gparted

Ok, that didn't work ... with regards to:

secondly, indeed there are two HD's, each with a
pri part --> sda1 and sdb1 AND
extended part --> sda2 and sdb2 THAT IN TURN
have logical partitions --> sda5 sdb5

  In both cases I ran Live CD Install selecting the automatic mode using the entire disk. It was Ubuntu that set the parameters. Isn't the extended partition where my "home" file goes?

Lets put this to rest for tonight.
Tomorrow I'm going to try a modified version of Question #3033 in Ubuntu:

  1. Unplug the power supply from my -sdb- disk.
  2. Run Live CD to install on -sda- (again - selecting all 80g allowing GRUB to put itself in the MBR).
  3. Reboot to see how it goes and shut down
  4. Reconnect the power to sdb and reboot.
    Crossing fingers and praying the 2 grubs don't conflict as I need some information that is on sdb.

Good night Pete, will update this post later tomorrow after trying the reinstall with only one drive.
Bruce Milmine

PS Ubuntu should have an "fdisk /mbr" program/command ... it would make all this so much easier.

Revision history for this message
peter b (b1pete) said :
#10

Bruce,

before doing that please post here what is registred in

menu.1st file under
/boot/grub under
the uncommented
root
caption.

how many root entries are there? and what do they contain? something like (hdx,y) -x and y being some numbers.

peter b

Revision history for this message
Wrwrwr (wrwrwr) said :
#11

fdisk /mbr ~= grub-install (check manual before applying)

You should be able to fix this by modifying /boot/grub/menu.lst.

Extended partition is a pseudo partition to make it possible to create more than 4 partitions, swap is where things not fitting in ram go (like virtual memory; it's necessary). Your partitions look all right.

Revision history for this message
Wrwrwr (wrwrwr) said :
#12

Another thing, if you still would like to try gutsy, then maybe upgrading a working 7.04 would work for you: https://help.ubuntu.com/community/GutsyUpgrades.

Revision history for this message
peter b (b1pete) said :
#13

no, your /home is in the pri partition together with the entire file system. the logical partition contains only the swap area that does exactly what the name says.

peter b

Revision history for this message
Bruce M. (canar-ciudad) said :
#14

Hi guys ... I was going to do the work earlier today but had to take the time to watch the Rugby World Cup.
Los Pumas (30) - Ireland (15) - Love the results.

Lets keep in mind I've been using Linux for only one month.

Ok, lets see here,

Peter:
   I think this is what you asked about:

## ## End Default Options ##

title Ubuntu, kernel 2.6.20-16-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.20-16-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-386
savedefault

title Ubuntu, kernel 2.6.20-16-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.20-16-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro single
initrd /boot/initrd.img-2.6.20-16-386

title Ubuntu, kernel 2.6.17-12-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.17-12-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro quiet splash
initrd /boot/initrd.img-2.6.17-12-386
savedefault

title Ubuntu, kernel 2.6.17-12-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.17-12-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro single
initrd /boot/initrd.img-2.6.17-12-386

title Ubuntu, kernel 2.6.15-29-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-29-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro quiet splash
initrd /boot/initrd.img-2.6.15-29-386
savedefault

title Ubuntu, kernel 2.6.15-29-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-29-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro single
initrd /boot/initrd.img-2.6.15-29-386

title Ubuntu, kernel 2.6.15-26-386
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-26-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro quiet splash
initrd /boot/initrd.img-2.6.15-26-386
savedefault

title Ubuntu, kernel 2.6.15-26-386 (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15-26-386 root=UUID=7dde58ad-7481-4115-9f66-73ef39507097 ro single
initrd /boot/initrd.img-2.6.15-26-386

title Ubuntu, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin

### END DEBIAN AUTOMAGIC KERNELS LIST

   ... and after that:

title Microsoft Windows 2000 Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

which of course is NOT there anymore, supposedly there is a fresh install of Ubuntu 7.04 there.
----------------------------------------------------

 Hi Wrwrwr - (neat name)
   As you see from above GRUB was installed on hd1 (Live CD doesn't give the option where to put it)
   As to GUTSY: that's what stated my problem, I thought I'd try it on my working version of 7.04, the "upgrade" process messed up. :(

  Lets do a nutshell history here:

  1. Win 2000 (on the 40G HD) (my only HD at that time) CRASHED!! All of a sudden it said: No Swapfile, created a 20MB temp swap file. Some services have been disabled. One of the "disabled services" was the ability to create a permenant swap file.
  2. Bought the 80HD and installed Win 2000. Then I set it as Master - slave present and set the 40G as Slave and recovered "all" of my personal files.
  3. Windows CRASHED yet again within a week - I was in the process of putting all personal files onto CDs (I hadn't finished) and lost everything I had not copied. They were still on the 40Gig thought so not to panic.
  4. Reinstalled Windows yet again. This time windows (don't ask how it happened, I have no idea ) encrypted some files and directories on the 40G) I managed to get them ZIPed and onto the drive with Windows. (never did recover them) :(
  5. Installed UBUNTU 6.04 LTS on the 40G - slave drive.
  6. Upgraded to 6.10 - no problems
  7. Upgraded to 7.04 - no problems
  8. Tried to upgrade to 7.10 - major problems that's why I'm here.
  9. Thought that installing 7.04 (I have the delivered Live CD now) on HD0 would eliminate the problem, and theough this process learned that the Live CD doesn't give the option as to where GRUB goes. My guess is that it saw GRUB on HD1 and used it with the existing /menu.lst. since this install (see earlier post here) overwrote Windows, but it still shows up in /menu.lst

   Foe this reason I thought of:

   I'm going to try a modified version of Question #3033 in Ubuntu:

  1. Unplug the power supply from my -sdb- disk.
  2. Run Live CD to install on -sda- (again - selecting all 80g allowing GRUB to put itself in the MBR).
  3. Reboot to see how it goes and shut down
  4. Reconnect the power to sdb and reboot.
    Crossing fingers and praying the 2 grubs don't conflict as I need some information that is on sdb.

  But now I'll await further comments and add a "sub-question"
  Lets say I get 7.04 on my 80G and then plug in the 40, will the two GRUBS conflict? Will I be able to recover my /home/bruloo file and email?

Bruce Milmine

Revision history for this message
Bruce M. (canar-ciudad) said :
#15

Just a thought ...

These problems are mine ... I made them with this venture to try Gutsy.
I am NOT going back to that other O$.

Bruce Milmine

Revision history for this message
Wrwrwr (wrwrwr) said :
#16

Grub must be in the master boot sector of the active disk (first in the boot order in bios) to work. So you can have two grubs one for each disk. But only the one that is on the active disk will get the chance to run.

In short plugging later will be ok if the plugged disk is after the one you've installed on in the boot order.

Those "root (hd1,0)" mean that the kernel is on the second disk, it doesn't tell you anything about grub's location (which doesn't really matter, unless you're going to change your disk setup, or remove one of the ubuntus completely).

First maybe try changing the boot order in bios and see what happens maybe you already have a proper grub for this new 7.04.

If this doesn't work, or you want to have one grub for both ubuntus, then i would try adding following to the menu.lst:

  title Ubuntu on the first disk, kernel 2.6.20-16-386
  root (hd0,0)
  kernel /boot/vmlinuz-2.6.20-16-386 root=UUID=xxx ro quiet splash
  initrd /boot/initrd.img-2.6.20-16-386

You need to discover the uuid of the first disk and replace xxxs with it, to do that type: "sudo vol_id --uuid /dev/sda1". You should also use a proper kernel version, run the cd you've installed from and type "uname -r" (a kernel image is just a file in /boot, so you can also just look for it).

I've never used them but these tools advised above would probably do that automatically.

Please make a copy of menu.lst, and make a copy of your files now (even by running a live cd), those procedures have the potential of making your data hard to recover.

Revision history for this message
Ergosys (ergosys) said :
#17

Some comments in random order:

- You weren't able to install gparted because you didn't use "sudo" before the "dkpg --configure -a" command to give yourself root privileges (this is why why it complained)
- I believe you can create, delete, format etc, all of your partitions with the live CD using manual partitioning. (I think this is the case, haven't installed in awhile).
- hdb has the boot flag set, you might try reseting that so that it is not seen as a boot drive. I think for some reason your BIOS is seeing that as the first drive, and booting from that since it has the boot flag set. When you plug it back in, it will probably boot first again.

I would try this before your other plan:
- install gparted
- turn off the boot flag on sdb.
- reboot, see if sda is the boot drive now

Revision history for this message
peter b (b1pete) said :
#18

Hello Bruce,

Following, belatedly, the thread there's no doubt that sdb1 is used by grub.

sda1 where you'd like ubuntu to reside and booted from is not in the cards.

Now, given that and your wishes to rescue some data off sdb1 prior to continuing the exercise of making your system working according to your liking, I see two things that must be accomplished:

-firstly, backup your data only -NOT THE FILESYSTEM- to some CD/DVD media; there's a v good backup/restore utility under linux/debian called mondo

 http://www.mondorescue.org/

as you'll see it is very well documented and easy to use after a very cursory lecture of the pdf howto provided on site.

-secondly, you'll have to get gparted somehow working; failing that it is a must to get the floppy with the utility that I mentioned made somehow on a pc with win. just plug in the drive the floppy and let it do its magic -answer some questions and it'll install itself on a separate part. after its install you have the HD/partition world of your PC wide open, COMPLETLY independent of any OS be it linux, win. just a taste of what you can accomplish with it -linux/ubuntu can be installed on a any partition of your liking on any HD, on partitions THAT YOU CREATE NOT PCKED UP RANDOMLY, in other words YOU CONTROL what goes where and how you want it to work. I have on my desktop PC win2000, winXP, winXP64, ubuntu610EDGY, FEISTY, and CassandraMINTlinux all installed and bootable as I like/choose from a simple menu that I create after the os install. Moreover, I can 'play' with partitions as I please -create, delete,wipe, shrink, slide, backup/restore to/from image files an any media etc. And, one additional thing, I'm not associated in any shape or form with the provider of this util; one thing I lnow for sure, it's v good and I use it for years vithout any problems whatsoever; it just sits there on its own part and when I need it I just bring it to life.

So, I still recommend deleting all partitions either using gparted or the utility that I mentioned to get the 'clean slate' state that I talked about, install feisty off live CD and use mondorestore to get your data back on your new install. Personally, I feel quite comfortable with this approach -it's sure and safe and probably the easiest for you. Sure you can follow the other ideas on the thread, the above is just my way of sorting out the problems that you're having.

I have to emphasize one more thing, v important, in my past installs of various os's, if there was data of any nature on partitions that were only deleted AND NOT WIPED that data was somehow seen by the new install and in quite a few cases the install was not successful.

So, I guess, you'd have to pick and choose whatever suits you best and act accordingly. I'm still here if you have any problems.

peter b

Revision history for this message
Bruce M. (canar-ciudad) said :
#19

Hi folks....

   Well, I didn't wait. I followed plan B
   Worked like a champ ... with a couple of hickups.

  1. Unpluged the power supply from my -sdb- disk.
    a. Pulled the jumper pin from -sda- so it would be master - single disk
  2. Installed M$ Windozz onto a 20Gig partition.
    a. created a 54Gig partition for Ubuntu, formatted NTFS.
  3. Ran the Live CD I got in the mail (7.04)
    a. It failed after selecting an auto install on the 54Gig partition.
  4. Re-booted to get to Windows.
    a. GRUB 22 error ... grrrrrr
  5. Had an idea ... and went looking in some old boxes and found a piece of GOLD: DOS 6.22 Boot Disk
  6. Booted DOS and ran: fdisk /mbr.
  7. Re-booted to Windows.
     a. Deleted 4 of the 5 partitions (Ubuntu had done something)
  8. OK, do an Ubuntu "manual" thing with the partitions.
     a. Again it didn't work.
     b. Repeated steps 6 & 7
  9. Re-booted to check Windows. OK!
  10 Rebooted with Ubuntu Live CD.
    a. ... and saw a couple of screen full of errors flash by as it was loading.
  11. Back to Windows and this time created a 54Gig partition and a 1Gig partition.
  12. Re-booted yet again this time with MY downloaded ISO burned to a CD of 6.06.
  13. It took a few tries but I finally got the "manual" partition option to work.

  I now have:
  1. 80Gig HD with:
      a 20G - Windows
      b 54G - / - Ubuntu
      c 1Gig Swap partition
  and:
  2 - a 40Gig HD that I have already copied my personal file from for use here (including Thunderbird Email).

  That second drive will eventually hold a back-up of /home refreshed on a weekly basis.

  OK ... to some answers:

   Wrwrwr, you said:
  In short plugging later will be ok if the plugged disk is after the one you've installed on in the boot order.
  > It was, and I knew that already. I've built my own computers, and a few friends, since the late 80's. This box was the first I haven't done myself since then.
  The rest of what you have said is already filed away in a text file for future use if needed, that I added to one of my rescued files I might add.
  Thank you kindly for your help.

   Ergosys, you said:
   you didn't use "sudo" before the "dkpg --configure -a" command
   > Ohhhh, and I knew I should have too. I'm just too new to Linux to think and drink coffee at the same time :)
   also:
   hdb has the boot flag set
   > It did, didn't it. It doesn't now.
   I'll keep these points in mind too. Thanks.

  and last but not least: Peter b
  WoW! Pete you passed on a lot of good stuff:
   1. -firstly, backup your data only -NOT THE FILESYSTEM- to some CD/DVD media
   A: Tried that with just my personal data (without reading this at the time) and my crippled 7.04 wouldn't allow it.

   2. utility under linux/debian called mondo
   A: That's a big YES! I'll do that tonight along with GParted as you suggested as well.
   Obviously not for this trip around the woods, but there will be a next time (I just hope it's a long time off in the future).

  Now this I didn't know, thanks:
  I have to emphasize one more thing, v important, in my past installs of various os's, if there was data of any nature on partitions that were only deleted AND NOT WIPED that data was somehow seen by the new install and in quite a few cases the install was not successful.

  Ok folks, thanks for all your help and input.
  I'm sure this Q will help others too.
  Tonight Ubuntu works while I sleep, getting the 164 updates it needs.
  Tuesday night again to upgrade to 6.10, and
  Wednesday another working night (while I sleep) getting 7.04 again.

  as for Gutsy ... maybe in January when the dust has settled. :)
  Take care my friends, see you again here sometime, even if I'm only reading what your saying to someone else that asked a question before I could.

  Again my heartfelt gratitude.
  Bruce Milmine

Revision history for this message
peter b (b1pete) said :
#20

Hello Bruce,

glad to see that you're 'out of the woods' and that our answers helped you now in the future.

and, if I may, one last thing before closing this tread; remember? I questioned the existence of your extended part?

Now, just a small pointer, the good practice recommends keeping the number of partitions on a HD to 4 out of which 1 can be an EXTENDED partition. And here comes the beauty of 'smart and thought out installs' vis-a-vis an 'install'. Linux as far as this goes is a champ -it is very flexible and smart compared to win --> it can be installed ON ANY TYPE of partition be it pri or logical and here is where the ext part comes into play.

Now, to the point, I'll tell you how I managed to have so many bootable OS's installed and ready to pick on one HD. I have 3 pri partitions that hold various flavours of win, 3 to be exact (win sits on the mbr and boot.ini gives me the choices) THEN there is the 'magical' 4th partition the EXTENDED ONE that in turn has 10 logical partitions where ALL the flavours of ubuntu and MINT sit WITH ONE ONLY 1GB SWAP partition for all three flavours of linux. I have /home and /usr sitiing on their own separate logical part SEPARATE from / . Now, grub, on all linux installs I installed grub on / of respective linux distro install. I back up all part to the second HD with either mundo or BootitNG and occasionally to DVD's. And one final thing, all partitioning, booting and HD maintenance is done under BootitNG that's installed on the fifth partition which it supports. All os's are happy and chugging along nicely giving me an easy, quiet pleasant life, That's all.

Happy computing Bruce.

peter b

Revision history for this message
Bruce M. (canar-ciudad) said :
#21

Hi Pete,

  Glad to see you here. I'm researching a new question regarding partitions. Hopefully I'll find an answer.
  From what I read above you have to be some kind of "power/super" user with that other OS and Ubuntu (linux in general)
  Looks like partitions are something you know about
  If I post it will be titled: HELP Partitions.

  I'm going to keep my old OS simply because it is already there and my ISP doesn't support linux. How sad that is.

  Have a great day Pete
  Bruce Milmine