I decided to use
gerard82 method and did work and solved the
problem for me.
Code: Select all
mount /dev/<original> /mnt/gentoo
mkdir /mnt/backup
mount /dev/<new-partion> /mnt/backup
cp -a /mnt/gentoo/* /mnt/backup
It worked fine and it copied the old gentoo install from
/dev/hda2 to the new hard drive and partition
/dev/sda1
My current sheme is:
# fdisk -l
Code: Select all
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2ad92ad8
Device Boot Start End Blocks Id System
/dev/hda1 1 10199 81920000 7 HPFS/NTFS
/dev/hda2 * 10199 19457 74367328+ 7 HPFS/NTFS
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xd982d982
Device Boot Start End Blocks Id System
/dev/sda1 * 1 29903 240195816 83 Linux
/dev/sda2 29904 30401 4000185 82 Linux swap /
Solaris
After that i re-installed grub and made sure that i got everything
working properly from gentoo side.
# grub
Code: Select all
grub> root (hd1,0)
Filesystem type is reiserfs, partition type 0x83
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0)"... 20 sectors are
embedded.
succeeded
Running "install /boot/grub/stage1 d (hd0) (hd0)1+20 p
(hd1,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
quit.
done
My working grub configuration is:
# cat /boot/grub/grub.conf
Code: Select all
splashimage=(hd1,0)/boot/grub/splash.xpm.gz
default 0
timeout 30
# Linux Partition /dev/sda1
# Genkernel 2.6.31-r10
title=Gentoo Linux 2.6.31-r10 (Genkernel )
root (hd1,0)
kernel /boot/kernel-genkernel-x86_64-2.6.31-gentoo-r10 root=/dev/ram0
init=linuxrc ramdisk=8192 real_root=/dev/sda1
initrd /boot/initramfs-genkernel-x86_64-2.6.31-gentoo-r10
# Windows Partition /dev/hda1
title=Microshit Widows
root (hd0,0)
makeactive
chainloader +1
title=Memtest86Plus (memory ram tester)
root (hd1,0)
kernel /boot/memtest86plus/memtest.bin
After this i was able to boot and use gentoo. The new gentoo install
worked but i was not able to access windows.
During this moment
/dev/hda was like this as far i was remember
Code: Select all
Device Boot Start Id System
/dev/hda1 * 1 7 HPFS/NTFS
/dev/hda2 83 Linux
/dev/hda3 Linux swap / Solaris
/dev/hda1 was the marked as boot but i could not start windows
as windows didn't boot.
After moving gentoo to the new partition i deleted and created a new
/
dev/hda partition which resulted in this:
Code: Select all
Disk /dev/hda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2ad92ad8
Device Boot Start End Blocks Id System
/dev/hda1 1 10199 81920000 7 HPFS/NTFS
/dev/hda2 * 10199 19457 74367328+ 7 HPFS/NTFS
I didn't notice what happened but the new partition got marked as boot.
I played with grub at boot time editing from which partition from
/dev/hda but still no luck. I could not boot from windows anyway
but while playing with it i got some messages complaining about windows
MBR.
I assume that windows
MBR got "killed"and that usually means bad
news.
I am also not able to mount
/dev/hda1 to access the FS and
recover windows data by copy to another drive.
Code: Select all
# mount /dev/hda1 /mnt/windows/
mount: you must specify the filesystem type
#
Code: Select all
mount -t ntfs /dev/hda1 /mnt/windows/
mount: wrong fs type, bad option, bad superblock on /dev/hda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Code: Select all
NTFS driver 2.1.29 [Flags: R/O MODULE].
NTFS-fs warning (device hda1): is_boot_sector_ntfs(): Invalid boot
sector checksum.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Primary boot
sector is invalid.
NTFS-fs error (device hda1): read_ntfs_boot_sector(): Mount option
errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device hda1): ntfs_fill_super(): Not an NTFS
volume.
If still possible how can i make it boot from windows or at least
to mount the partition to recover the data and re-install windows.
I also thought about install windows into
/dev/hda2 and from
there with recover data software proceed to
/dev/hda1 recovery
data.
If all my gentoo configurations are correct; what are your
recommendations ?