You are not logged in.

#1 2009-02-17 12:15:13

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Big messup Boots to Grub with no prompt

I really messed up. First I did a update and Xbroke. Then in trying to fix that I found out Root was full. So I repartitioned my backup drive and set it as the main drive. I used install disk to repartition and then trie to run thru the installation process, but when it came to configuring all the files (rc.conf,host,fstab ...etc) all the files were blank. So I finally copied everything over to the new main drive.I made the first partition /boot and made it bootable. Now when I try to boot the computer I get either a bunch of 9's on the screen from one drive or if I change the bios to the other drive booting I get GRUB steady with no prompt afterwards and the computer locks up. The install disk will not reinstall because it still gives me blank screens for the config files, but I can go into the arch prompt and mount everything to check it out.What did I do and how do I fix it??

Offline

#2 2009-02-17 13:36:59

aglarond
Member
From: Texas, USA
Registered: 2008-11-20
Posts: 129

Re: Big messup Boots to Grub with no prompt

I would probably start by re-installing grub. Boot to your Arch install disk and run

dd if=/dev/zero of=/dev/sda bs=446 count=1
grub-install /dev/sda

Assuming your disk is sda. Then see where it goes from there. I've run into the same problem with getting a prompt that just says "Grub" and then not going anywhere and this fixed it. For some reason, just the grub-install didn't do it; I had to wipe the MBR first with the first command.

-mS

Offline

#3 2009-02-18 02:24:04

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Re: Big messup Boots to Grub with no prompt

did the dd if=/dev/zero of=/dev/sda bs-446 count=1 and it did work
but grub-install /dev/sda  came up with :probing devices to buess bios drives, could not find devices for /boot, not found or not a block device.
now under sda1 I have/boot and when I mount it and checkthe files I have
system.map26
diag1.img
/grub
kernel26.img
kernel-fallback.img
umlinuz26
I dont have a /sda that I can bring up? I can load it manually If i know where to try. After I loaded the dd if=/dev/zero....I tried rebooting and got the grub with no prompt freezing again. But at least now I am closer.

Offline

#4 2009-02-18 03:52:53

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Big messup Boots to Grub with no prompt

yup - you need to have /boot mounted first
something like this:
mkdir /whatever
mount /dev/sda1 /whatever
grub-install --root-directory=/whatever /dev/sda

Offline

#5 2009-02-18 12:29:13

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Re: Big messup Boots to Grub with no prompt

This is where I get confused, I take things literally. I mounted boot (/boot) when the next line is to install grub to the root directory (/) which I did not mount yet but is on /dev/sda4. And you want it to go to/dev/sda which I don't have unless you are talking about the whole HDD. I need clarification, I don't want to make another mistake and go deeper.

Offline

#6 2009-02-18 13:51:04

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Big messup Boots to Grub with no prompt

grub consists of (basically) two parts 1) the initial boot loader (which has to fit in 446 bytes because its (usually) resident on the mbr) and 2) the boot-loader proper which has support for the most common filesystems - which is why - as opposed to lilo - you dont have to rerun it when you change kernels/initrds.

When you install grub - it has to put its secondary part somewhere - which is /boot/grub

It looked from your original posting that you do not have a seperate /boot filesystem (some do and some dont - it's no biggie either way).
This - again - means that /boot has to be available which means that you have to mount your root filesystem somewhere to make it available for grub.

The /dev/sda in my previous post means the whole harddisk - or rather 'the boot sector' of the entire harddisk, ie the MBR.

If you want to take any response literally - we need a lot more information than what you give us.
I would suggest that you do a lot more reading up on partitions, boot-processes and grub - and do not _ever_ take any respons literally, they are mostly meant as pointers for you to figure out for yourself what do to.

<edit>
Oooops - reread your last post and I see that you have the root filesystem on /dev/sda4.
Well - now you have _two_ scenarios - whether or not you have a seperate boot-partition.
If you do not - then just replace /dev/sda1 with /dev/sda4 above
If you do - and it is on /dev/sda1, then just:
mkdir /whatever
mount /dev/sda4 /whatever
mount /dev/sda1 /whatever/boot
grub-install --root-directory=/whatever /dev/sda
</edit>

Last edited by perbh (2009-02-18 13:56:02)

Offline

#7 2009-02-18 14:08:03

aglarond
Member
From: Texas, USA
Registered: 2008-11-20
Posts: 129

Re: Big messup Boots to Grub with no prompt

perbh wrote:

yup - you need to have /boot mounted first
something like this:
mkdir /whatever
mount /dev/sda1 /whatever
grub-install --root-directory=/whatever /dev/sda

Woops. Apologies for not mentioning the mounting first.

-mS

Offline

#8 2009-02-18 14:49:28

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Re: Big messup Boots to Grub with no prompt

mounted /dev/sda4 to /tmp
mounted /dev/sda1 to /tmp/boot
did grub-install--root-directory=/tmp /dev/sda
got the following:  Probing devices to guess bios
/sbin/grub-install: line 435: cmp: command not found   (this happened 5 times)
the file /tmp/boot/grub/stage1 not read correctly
I did have a stage1 under grub in /boot of sda1, but it was the one I copied from sdb when sdb was the main drive.

Offline

#9 2009-02-18 15:02:12

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Big messup Boots to Grub with no prompt

So what does that tell you? That it cannot find /usr/bin/cmp!
So you maybe messed up when copied over!

You _do not_ mount something in /tmp because it is widely used by a lot of apps.
Just make a new directory for your mounting.

Also - use a live-cd to boot from (grml is my personal favourite) and then do your mounting and grub-install from there.
Also - I would do the copying/cloning from a live cd and _not_ from a running system.

<edit>
In short - if I were you, I would reinstall.
I know you say you cannot do so - but if you have successfully installed once, you can do it again - but ... you may have to choose a different 'mode' for your disks, ie if your new sda is an old ide-disk, you may have to go with 'legacy ide' mode.
If the disks are just vaguely similar - if you have installed once, you can do it again.

On _any_ (almost) distro - you must (or should) know what partitioning means and how much is needed - there must be 100's of posts on the subject. Do not look for optimum, slim solutions unless you _know_ what you are doing. Personally, I would say min 12 gig, max 20 gig for your root filesystem (/var/cache can grow quite uncomfortably unless you clean out regularly!)
</edit>

Last edited by perbh (2009-02-18 15:11:58)

Offline

#10 2009-02-18 22:11:50

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Re: Big messup Boots to Grub with no prompt

I am going to download a new Arch onto a cd and reinstall. I have Duke (2007-05) that I originally bought and loaded. So I amway behind. Also when I first started I just bought one and have been learning from that. When I download an iso should I use a i686 or a x86-64? I have an amb 64x2 duocore +4200 processor. But I have been running the i686 from Duke. Is there any difference in the two as far as learning and running them? The more I research and mess up the more I find I made small mistakes in the beginning that grew with time and upgrades.Also when I install the new distro, can I transfer some programs already installed in the old HDD or should I reinstall everything? (I probably should reinstall, but the time I put into getting everything runing the way I want it was a lot) Thanks for the lessons.

Offline

#11 2009-02-19 12:54:35

aglarond
Member
From: Texas, USA
Registered: 2008-11-20
Posts: 129

Re: Big messup Boots to Grub with no prompt

You'll probably want to do a search for x86 here in the forums. The topic of which one to run has been covered a lot and in more detail than you probably want in this thread.

As for the reload, I'd reinstall the packages from scratch to make sure everything's ok. Hang on to your home directory since that will keep all of your personal settings. I also tar off a copy of /etc into home before reloading mine. That way weird config changes I might not remember get saved and I can copy them back over easily.

-mS

Offline

#12 2009-02-20 04:06:36

Trevorofmolino
Member
Registered: 2008-07-24
Posts: 37

Re: Big messup Boots to Grub with no prompt

reinstalled Arch onto sda and everything was successful except the boot backup img. The Boot img was successful, but when I rebooted it went back to grub with no prompt and freezing. Could the first MBR sector of the hard drive be bad? At some point I was using this drive as storage and after the last system upgrade I got the error that there was a bad superblock read error for sda3. I did a e2fsck on sda 1, sda3 and sda4 all were clean , but I did the same on /sda and I got a bad superblock . Is that the MBR? and If it is, then if I wipe and reload , the bad superblock will cause the same problem. is this drive dead for booting and only good for storage or is it really going bad and needs to be trashed??

Last edited by Trevorofmolino (2009-02-20 13:28:43)

Offline

#13 2009-02-20 13:44:16

aglarond
Member
From: Texas, USA
Registered: 2008-11-20
Posts: 129

Re: Big messup Boots to Grub with no prompt

Superblocks actually come after the MBR and there are multiple copies across a drive, so it's ok for one or two superblocks to go bad. It's usually just a problem with the filesystem, which will just duplicate another one. If you do a repair on the filesystem and the error returns, it could indicate hardware. We used to just mark that section of the drive as bad and not use it, but with storage being as cheap as it is now, I'd just get a new drive.

Boot from a livecd (Arch or other; doesn't matter) and run fsck a couple of times on sda and see what it returns. If errors keep coming back, I'd recommend a new drive.

As for why GRUB is locking up on you, I have no idea, especially if you've blown away the MBR and re-installed. The MBR is likely right next to the first superblock, though, so that could be another indication of a hardware problem.

It would probably be a good idea to wait for another reply from somebody else, though. There may be something I'm not considering.

-mS

Offline

Board footer

Powered by FluxBB