Hi,
Quote:
Now my lfs is on sda5 and the problem is clearly visible...
|
sda5? I don't hope so..... That looks like a windows FS, not a linux one
Your swap is on /dev/sda4
You have 2 linux partitions: /dev/sda3 and /dev/sda6. I'm guessing that /dev/sda6 is the one LFS is on.
Or do I misunderstand and did you actually build LFS on /dev/sda5 (The next quote makes me doubt myself.)?
Quote:
Can u tell me whether its possible to change the file system while keeping data on it.. If not what is the other way to get this stupid problem solved...
|
I don't know of any tools that can change the FS and leaves the data as-is.
I'm not sure if it is possible what you ask, I don't have any practical experience with a problem like this. So the next part is theoretical and untested. Worst case: You loose some time before starting over again. Best case: You safe the work you've done.
To my knowledge the dd command cannot be used, it also copies the undelying structure, not only the data.
Maybe you can copy all the data to /dev/sda6 (assuming that that one is free and formatted with a linux capable FS like ext2/ext3/...).
After copying you need to change some files. All that have /dev/sda5 in them to /dev/sda6 (fstab comes to mind, grub config file maybe others too).
Actions to take:
1) boot into your (linux) host system and become the root user,
2) mount /dev/sda5 to /mnt/lfs
3) create a mount point for /dev/sda6 (
mkdir /mnt/sda6)
4) mount /dev/sda6 to /mnt/sda6
5) copy everything to /mnt/sda6 (
cp -dpr /mnt/lfs/* /mnt/sda6/)
Do use the -dpr options. It tells cp to:
d - preserve links,
p - preserve mode,ownership,timestamps,
r - copy directories recursively
This makes sure you make a 1 to 1 copy, very important.
After the copy command is done I would unmount both partitions (/dev/sda5 and /dev/sda6) and remount sda6 on /mnt/lfs, You probably have the LFS variable automatically set to /mnt/lfs and this will make sure that all is done on the correct partition.
At this point all data is copied to /dev/sda6 and /dev/sda6 is mounted on /mnt/lfs.
Now you need to enter your LFS system (you have probably done this before).
Fix the files that contain /dev/sda5 (only fstab and grub come to mind). First edit your fstab file.
You are now back to were you started with grub.
I would suggest reinstalling grub (start at the beginning of that chapter), do remove the source directory if you haven't already. Also remove the /boot/grub directory (rm -rf /boot/grub). Why start over? I'm not sure if grub hardcodes any info, to make sure you should reinstall.
Hopefully you are able to continue from here. But don't be too happy yet! Problems could arise when you try to boot into your LFS system. This copy idea I had might not work...... Then again, maybe it does work
Anyway, hope this gets you going again.