Gentoo Forums
Gentoo Forums
Quick Search: in
Moved Partitions Now Can't Boot - Help Needed [SOLVED]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Sep 24, 2004 6:18 pm    Post subject: Moved Partitions Now Can't Boot - Help Needed [SOLVED] Reply with quote

hi folks - pretty simple query here, i think:

i've moved my boot, swap and general partitions up (sequentially speaking) on the hard drive to free up some unallocated space, and unsurprisingly my machine won't boot now. gives me:

Code:
GRUB Loading stage1.5.
GRUB loading, please wait...
Error 22


acronis in my XP partition - when moving the partitions originally - said that i'd need to do this:

Code:
Insert Linux boot disk
Boot PC to Linux boot diskette and login as root
/sbin/grub
restart


just as predictably, that didn't work.

anyhow, how do i clue GRUB in to where the new partitions are. i can work off the Gentoo 2000.1 install disk.

any and all help appreciated. i'm ok b/c i did this at the end of the week, and backed up my home and etc drives beforehand, but i need my laptop back.

if i have to rebuild the whole thing i will, but would obviously prefer to have my existinging installation - which should still be there just waiting to be found - recovered.

TIA.
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/


Last edited by sog on Sat Sep 25, 2004 10:21 am; edited 1 time in total
Back to top
View user's profile Send private message
amiatrome
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 180
Location: Campus | Arena Country Club | Home

PostPosted: Fri Sep 24, 2004 6:26 pm    Post subject: Reply with quote

Use the Gentoo LiveCD and update /boot/grub/grub.conf. For your convenience . You will need to update your fstab as well.
_________________
blog | homepage | alias | prompts
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Sep 24, 2004 6:53 pm    Post subject: Reply with quote

thx for the quick tip - love this place.

anyway, this is a stupid question i know but how do i mount the file system properly to get at the grub.conf file? i tried going by the mounting instructions in the install guide, listed here:

Code:
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot


no go - "you must specify the filesystem type"
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Sep 24, 2004 7:11 pm    Post subject: Reply with quote

ok, scratch that question as it was truly dumb. was fogging on the fact that i'm running a dual boot, so of course the kernel was having trouble mounting an NTFS partition.

anyhow, i got that mounted, and checked out my grub.conf.

i changed the HD0,2 in my grub.conf to HD0,1 to reflect the new partitioning scheme.

but after a reboot i got the same exact error - 22 - and didn't even get into GRUB. a quick fdisk -p shows me that my new boot partition - /dev/hda2 - is not marked as a boot partition in fdisk - might that have something to do with it? if so, how do i toggle that on without wiping out my boot partition?

here's the important stuff so far:

my partition table:

Code:
device       boot     start      end         blocks             system
/dev/hda1 *          1           1576       11914528+      HPFS/NTFS
/dev/hda2             1577      1609       249480            Linux
/dev/hda4             1610      2859       9450000          Extended
/dev/hda5             1610      2122       3878248            Linux swap
/dev/hda6             2123      2859       5571688            Linux


my grub.conf
[both instance of hd0,1 have been changed from what was hd0,2]
Code:

default 0
timeout 30
splashimage=(hd0,1)/grub/spash.xpm.gz

title=Gentoo Linux 2.6.7
root (hd0,1)
kernel /kernel-2.6.7-gentoo root=/dev/hda6

title=Windows XP
rootnoverify (hd0,0)
chainloader +1

_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Fri Sep 24, 2004 8:17 pm    Post subject: Reply with quote

just for reference, here's what the partition table USED to look like - this is prior to the reparitioning:

Code:

Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1576    11914528+   7  HPFS/NTFS
/dev/hda2            2489        2593      793800   1b  Hidden W95 FAT32
/dev/hda3            2594        2626      249480   83  Linux
/dev/hda4            2627        3876     9450000    5  Extended
/dev/hda5            2627        3139     3878248+  82  Linux swap
/dev/hda6            3140        3876     5571688+  83  Linux

_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
amiatrome
Apprentice
Apprentice


Joined: 28 Jun 2004
Posts: 180
Location: Campus | Arena Country Club | Home

PostPosted: Sat Sep 25, 2004 4:06 am    Post subject: Reply with quote

Quote:
22 : No such partition
This error is returned if a partition is requested in the device part of a device- or full file name which isn't on the selected disk.


grub.conf only specifies where the kernel is. I think you would have to do the following to update your hard drive's MBR so grub can be loaded. Didn't occur to me earlier. :oops: Hope this helps.

Quote:
Code Listing 9: Installing GRUB in the MBR

grub> root (hd0,0) (Specify where your /boot partition resides)
grub> setup (hd0) (Install GRUB in the MBR)
grub> quit (Exit the GRUB shell)

_________________
blog | homepage | alias | prompts
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Sat Sep 25, 2004 10:06 am    Post subject: Reply with quote

CHECK THAT - figured it out.

here's what i did:

mount /dev/hda6 /mnt/gentoo
mount /dev/hda3 /mnt/gentoo/boot
chroot /mnt/gentoo /bin/bash
env-update
grub

root (hd0,1)
setup (hd0)
quit

rebooted, and got some weird disk error but i'm hopeful that's just my fstab needing an update. will report back.

thanks for all the help so far


>>>>>OLD POST<<<<<<

excellent - that is exactly what i was looking for.

anyhow, i figure what i need to do now is

1. mount the environment
2. chroot the environment
3. grub as below

so my question is, can anyone give me the commands spelled out using my environment (outlined above). i'm hesitant to work off the install version, b/c obviously i don't want to install.

i'm a little cagey simply because i'd prefer not to wipe anything out, so any guru help here would be much appreciated ;)
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
sog
Guru
Guru


Joined: 04 Apr 2004
Posts: 356

PostPosted: Sat Sep 25, 2004 10:20 am    Post subject: Reply with quote

yup - that was it.

simply altered my boot in fstab to hda2 from hda3 and everything is more or less kosher.

thanks again for the help amiatrome. you rock.
_________________
------------------------------------------------
(blog) http://www.redmonk.com/sogrady/
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 15665
Location: Colorado

PostPosted: Sat Sep 25, 2004 3:56 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Knock knock. Who's there? Xorg now supports* HAL to automatically hot-plug input devices.

*Disclaimer: support != automatically makes it work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum