Re: Need Help Editing Grub OOPS! Screw up...

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Mark Phillips
Date:  
To: Main PLUG discussion list
Subject: Re: Need Help Editing Grub OOPS! Screw up...
Kitepilot,

Thanks for the offer of "phone support". At this point not sure why my boot
partition is hda5, but it is.

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00069357

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       24321   195358401    5  Extended
/dev/hda5   *           1       24072   193358277   83  Linux
/dev/hda6           24073       24321     2000061   82  Linux swap / Solaris


Disk /dev/hdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/hdb doesn't contain a valid partition table

Probably set it up wrong in the first place a couple of years ago. I just
followed the netinstall CD for Debian. Anyway, I am in now and moving on to
fdisk the new drive and rsync my backups from another computer, and setup my
backups to run here.

Cheers!

Mark

On Mon, Jan 25, 2010 at 10:51 AM, <
> wrote:

> I believe "setup(hd1,4)" is wrong.
> Should be "setup(hd1)"
>
> I also wonder how you make "root(hd1,4)" work, cuz partitions are counted
> from 0 and only 0-3 are "physical" partitions.
> Beyond that, they are "logical" partitions, and I don't recall to have ever
> booted from a "logical" partition.
>
> Finally, make sure that whichever partition you are booting from is flagged
> as bootable.
> Feel free to post the output of
> cat /proc/partitions
> and
> sudo fdisk -l /dev/sda
> (or whatever HD you plan to boot from)
>
> If the BIOS recognizes the HD and partitions, and still doesn't boot, we
> are
> facing and enless permutations of unknowns...
> I'd suggest you boot from a CD, start and SSH server, give me login
> credentials (make sure you get a public IP or you "poke a hole" in your
> router) and I'll walk you through over the phone and a "screen" session.
> I've done 46591274 GRUBs.
>
> The statement above is fairly dense, feel free to ask... :)
> ET
>
>
>
>
>
>
> Mark Phillips writes:
>
> > Kitepilot,
> >
> > Well, I did this....
> > grub
> > root(hd1,4) - got an appropriate message like "found something"
> > setup(hd1,4) -- got a bunch of messages that looked right - basically
> > confirming it found everything
> > quit
> >
> > Initially, I tried root(hd1,0) and got an error message; also setup (hd1)
> > and got an error message. BTW root(hd1) also returns an error message.
> The
> > commands above were the only ones that worked without errors.
> >
> > I also change my fstab file as shown earlier (basically changed hdb to
> hda).
> > And the menu.lst was changed appropirately - hdb to hda as I posted
> earlier.
> >
> > Moved the disk from ide2 to ide1, and installed the new blank disk in
> ide2.
> >
> > Booted up, and no boot, just a black screen. I made sure the jumpers were
> > set for master on ide1 and slave on ide2. ide1 has the linux drive and
> ide2
> > has the new blank drive.
> >
> > Checked the bios to see if both drives are recognized, and they are, and
> in
> > the right spots as well.
> >
> > Currently downloading most recent knoppix image to burn a cd and see
> what's
> > up. Any suggestions would be appreciated.
> >
> > Mark
> >
> > On Mon, Jan 25, 2010 at 9:06 AM, <
> > > wrote:
> >
> >> > grub
> >> > root (hd1,0)
> >> > root (hd1)
> >> NO
> >>
> >> grub
> >> root (hd?,?)
> >> setup (hd?)
> >> ^^^^^
> >> Sorry...
> >> ET
> >>
> >>
> >>
> >>
> >> Mark Phillips writes:
> >>
> >> > kitepilot,
> >> >
> >> > Thanks for the clarification.
> >> >
> >> > Sorry to be such a newbie.....You wrote
> >> > grub
> >> > root (hd1,0)
> >> > root (hd1)
> >> > It should answer that it found the stages, verify that there are no
> >> errors.
> >> > quit
> >> >
> >> > Should it be
> >> > grub
> >> > root (hd1,4)
> >> > root (hd1)
> >> > It should answer that it found the stages, verify that there are no
> >> errors.
> >> > quit
> >> >
> >> > because "find /boot/grub/stage1" returns (hd1,4) and not (hd1,0)? Or,
> >> > perhaps it doesn't matter, and grub will do the right thing when I use
> >> > (hd1,0)?
> >> >
> >> > Thanks!
> >> >
> >> > Mark
> >> >
> >> > On Mon, Jan 25, 2010 at 7:06 AM, <
> >> > > wrote:
> >> >
> >> >> >> is there perhaps, a typo?
> >> >> No, it's not a typo!
> >> >> The drive is still hd1 until you pull the old one.
> >> >> Grub doesn't know about which drive, the BIOS tell it to.
> >> >> Once you pull the M$ drive and flip the cables, GRUB will see it as
> hd0.
> >> >> ET
> >> >>
> >> >>
> >> >>
> >> >> Mark Phillips writes:
> >> >>
> >> >> > I understand the flow....shouldn't I tell grub somehow that the new
> >> boot
> >> >> > drive is hd0,0? In your steps below, is there perhaps, a typo?
> >> >> >
> >> >> > Thanks!
> >> >> >
> >> >> > Mark
> >> >> >
> >> >> > On Sun, Jan 24, 2010 at 3:58 PM, <
> >> >> > > wrote:
> >> >> >
> >> >> >> >> 1. How do I change grub on the Linux drive (hdb) to say "the
> ...
> >> >> >> If you are running GRUB 0.XX (GRUB 1.XX is different):
> >> >> >> Boot your Debian machine and as root run:
> >> >> >> grub
> >> >> >> root (hd1,0)
> >> >> >> root (hd1)
> >> >> >> It should answer that it found the stages, verify that there are
> no
> >> >> errors.
> >> >> >> quit
> >> >> >>
> >> >> >>
> >> >> >> Then take a backup of /boot/grub/menu.lst and and make sure that
> >> >> everything
> >> >> >> is either using UUID(s) or labels or every reference to hd1,0 is
> >> >> converted
> >> >> >> to hd0,0
> >> >> >>
> >> >> >> Verify your /etc/fstab likewise.
> >> >> >>
> >> >> >>
> >> >> >> > 2. Do I move the second drive to the first ide port, or leave it
> as
> >> >> ...
> >> >> >> Shutdown, pull the cable from the windoze drive and plug it to
> Linux
> >> >> drive.
> >> >> >> Turn on and pray... :)
> >> >> >> Free advice, you can't sue me ;-)
> >> >> >> YMMV
> >> >> >> ET
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >>
> >> >> >> Mark Phillips writes:
> >> >> >>
> >> >> >> > I have two ide drives in one machine - drive 1 is a Windows
> drive
> >> and
> >> >> >> drive
> >> >> >> > 2 is a Linux drive. Using grub, I can boot into either windows
> or
> >> >> debian.
> >> >> >> I
> >> >> >> > want to remove the windows drive and replace it with a larger,
> >> blank
> >> >> >> drive
> >> >> >> > for backup storage. I have a feeling if I just remove the first
> >> drive
> >> >> and
> >> >> >> > put the new one there, the machine will not boot, since the MBR
> is
> >> >> >> probably
> >> >> >> > on the first drive (it came with the machine, and I just added
> the
> >> >> second
> >> >> >> > drive for Linux). My questions:
> >> >> >> >
> >> >> >> > 1. How do I change grub on the Linux drive (hdb) to say "the
> >> windows
> >> >> >> drive
> >> >> >> > is dead, boot here instead, long live linux"?
> >> >> >> >
> >> >> >> > 2. Do I move the second drive to the first ide port, or leave it
> as
> >> >> the
> >> >> >> > second ide drive and put the new drive in the fist ide port?
> >> >> >> >
> >> >> >> > Thanks!
> >> >> >> >
> >> >> >> > Mark
> >> >> >> ---------------------------------------------------
> >> >> >> PLUG-discuss mailing list -
> >> >> >> To subscribe, unsubscribe, or to change your mail settings:
> >> >> >> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> >> >> >>
> >> >> ---------------------------------------------------
> >> >> PLUG-discuss mailing list -
> >> >> To subscribe, unsubscribe, or to change your mail settings:
> >> >> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> >> >>
> >> ---------------------------------------------------
> >> PLUG-discuss mailing list -
> >> To subscribe, unsubscribe, or to change your mail settings:
> >> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> >>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss