View previous topic :: View next topic |
Author |
Message |
Gr0m1t n00b
Joined: 24 Aug 2004 Posts: 37 Location: MN
|
Posted: Fri Aug 27, 2004 2:09 pm Post subject: Accident! Formated sda1 |
|
|
I have a system with 6 SCSI drives and I wanted to format the other drives. Well I guess I didn't have my coffee cause I formated sda1 which is the boot partition. I am using Grub and I'm wondering if I can reload what ever needs to be in boot partition. If there is no other options I could Wipe the whole drive and start from scratch but it took me a week to get this box p and running and I'm growing tired. Can anyone help me??? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Fri Aug 27, 2004 2:21 pm Post subject: |
|
|
Gr0m1t,
You can just reinstall Grub and copy your kernel from /usr/src/linux/arch/i386/boot/bzImage where it will be from the last build.
You will need to recreate the grub.conf file too. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
deprecated Tux's lil' helper
Joined: 21 Aug 2002 Posts: 118 Location: Madison, WI
|
Posted: Fri Aug 27, 2004 2:23 pm Post subject: |
|
|
Sure, its not that bad actually.
There are basically 2 things on your boot partition, the kernel and the boot loader.
To restore the boot loader, get out your LiveCD and boot from it, make sure your network is up, mount your root partition as /mnt/gentoo, mount your boot partition as /mnt/gentoo/boot, and chroot into it (chroot /mnt/gentoo /bin/bash). Run `source /etc/profile`, and then simply `emerge grub`. Once that is done, if you use genkernel, just rerun it, or if you compiled your own kernel copy it from /usr/src/linux/arch/i386/boot/bzImage to your boot partition. Finally, re-edit your grub.conf file to point to your kernel.
If you need more details, refer back to the installation documentation, but since you did it once recently you probably have a good idea of how to do all this. Good luck!
--Dep _________________ Communication is easier when everyone agrees on the medium. Please use proper English and refrain from using shorthand! |
|
Back to top |
|
|
Gr0m1t n00b
Joined: 24 Aug 2004 Posts: 37 Location: MN
|
Posted: Fri Aug 27, 2004 3:14 pm Post subject: ok |
|
|
i do all of this mounting and such and get
sys -boot/grub failed!
please mount your boot partition manually
so what shall i do?
i chroot into it but i get this error?
any ideas? |
|
Back to top |
|
|
deprecated Tux's lil' helper
Joined: 21 Aug 2002 Posts: 118 Location: Madison, WI
|
Posted: Fri Aug 27, 2004 3:19 pm Post subject: |
|
|
Sounds like your boot partition wasn't successfully mounted. Was there an error when you tried to
# mount -t ext2 /dev/sda1 /mnt/gentoo/boot
? If it returned right to a prompt, run dmesg and see if anything was logged when you tried to mount it, if so, post it here. Make sure you have sda1 properly formatted as well.
--Dep _________________ Communication is easier when everyone agrees on the medium. Please use proper English and refrain from using shorthand! |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Fri Aug 27, 2004 3:21 pm Post subject: |
|
|
Gr0m1t,
Everything that belongs in /boot is already compiled and installed elsewhere on your system.
Boot the liveCD,
Mount your root partition on /mnt/gentoo
Mount all your other partitions in the right pkaces,
e.g. the boot partition at /mnt/gentoo/boot
Do the chroot steps.
Install grub, in line with the handbook
Copy the kernel to /boot
Copy the initrd file to /boot, if you need one
Recreate grub.conf _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
rol1 n00b
Joined: 12 Jan 2004 Posts: 5 Location: Las Vegas
|
Posted: Fri Aug 27, 2004 3:52 pm Post subject: |
|
|
You can use Ranish partition manager and reenter the cylinder, head, and sector info manually, save with no format and hope it's there when you reboot.
If you have no idea where those boundaries are there is a program, Symon that has a partition search function that looks for boot code to locate partitions. But if it was your first partition you should know or guess the values. |
|
Back to top |
|
|
Baintronic n00b
Joined: 06 Aug 2004 Posts: 27 Location: Minnesota
|
Posted: Fri Aug 27, 2004 3:54 pm Post subject: well.... |
|
|
well we did all of this....
then emerged grub which came in correctly
copied the zImage to /boot
confirmed it is there
made newgrub.conf file.
boot grub error 15.
any ideas?
should i just run grub and reinstall it that way? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri Aug 27, 2004 4:02 pm Post subject: |
|
|
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54317 Location: 56N 3W
|
Posted: Fri Aug 27, 2004 4:12 pm Post subject: |
|
|
Baintronic,
Its bzImage not zImage.
Error 15 means that grub can't find the the file you have named in the kernel line in your grob.conf.
The kernel file names in both places must match exactly.
Look here http://62.3.120.141/Gentoo/ for an example.
Thats bits of a real live gentoo box exposed on the web.
/boot is its real running /boot partition. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Gr0m1t n00b
Joined: 24 Aug 2004 Posts: 37 Location: MN
|
Posted: Fri Aug 27, 2004 7:10 pm Post subject: |
|
|
Got it working, ended up recompiling the kernel... again. Works great now.
Thanks for all your help! |
|
Back to top |
|
|
|