LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mounting an ext4 filesystem from ext3(or reiser): What do I need? (https://www.linuxquestions.org/questions/slackware-14/mounting-an-ext4-filesystem-from-ext3-or-reiser-what-do-i-need-755709/)

svar 09-16-2009 02:58 PM

mounting an ext4 filesystem from ext3(or reiser): What do I need?
 
I just installed Slack13 and on encouragement by a friend who said ext4 was going to be the default on other distros, I tried ext4. The only problem is lilo seems messed up, so I thought I can simply boot another distro(such as Slack 12) I have on my machine and fix lilo. Didn't work
-among other things no other distro can see ext4. So the question is:
Is there some package I can install on an older installation that will allow the older installation to mount an ext4 fs? In general I will need this, as I regularly transfer files between my installations, also for backup purposes and I do not plan to work exclusively with Slack 13 and ext4

gegechris99 09-16-2009 03:51 PM

you can just boot into your system using the DVD or first CD.

At boot prompt, enter:

Code:

hugesmp.s root=/dev/hda1 noinitrd ro
change /dev/hda1 if your root (i.e. /) directory is located on another partition.

You can then correct your lilo configuration (edit /etc/lilo.conf and then run lilo).

Regarding ext4 filesystem, it was introduced as experimental in kernel 2.6.19 and was tagged as stable in kernel 2.6.28. So I would say that any distribution using a kernel >= 2.6.28 should be able to read your ext4 partition except if the distro team decided to compile the kernel without support for ext4. Also make sure the distro upgraded the e2fsprogs package as mke2fs is used to create ext4 partitions.

svar 09-17-2009 12:30 AM

Thanks. So an older installation with an older kernel, such as Slack 12.0 just needs to upgrade e2fsprogs?

gegechris99 09-17-2009 03:03 AM

Quote:

Originally Posted by svar (Post 3686404)
Thanks. So an older installation with an older kernel, such as Slack 12.0 just needs to upgrade e2fsprogs?

I'm afraid that you also need the kernel >= 2.6.28

svar 09-17-2009 03:21 AM

So I can only transfer files if I am using a >=2.6.28 kernel....
Which brings up the question: Is ext4 really better than ext3 and reiser?

gegechris99 09-17-2009 03:35 AM

Quote:

Originally Posted by svar (Post 3686587)
Is ext4 really better than ext3 and reiser?

I think you should do your own research on the internet and decide for yourself.

For my part, ext4 is the default filesystem when installing Slackware 13.0. I trust Patrick Volkerding on that topic. But as said, it's a question of personal choice.

For you it may be better to stay with ext3 or reiser because you'd like to transfer documents across partitions.

svar 09-17-2009 03:51 AM

I will be using Slack 13 quite often, so since I guess I can mount fs's and transfer files
cp myfile /mnt/Slack12/myfile
cp /mnt/Slack12/myfile ./

if I am in ext4, I guess it will be ok and stick with ext4. It's just that I cannot do that if I am on older
kernels....

gegechris99 09-17-2009 03:58 AM

Yes you are correct. If you do the transfers while in 13.0, it's OK to have ext4.

I'm actually doing what you suggest between my partitions for 13.0 (ext4) and 12.2 (ext3).

svar 09-17-2009 04:39 AM

Thanks again. So, I'll try ext4. Pat's judgement has been more than trustworthy till now...

plasmonics 09-17-2009 08:14 AM

If you are booting an older distro to mount an existing ext4 fs, you can try "mount -t ext4dev". This assumes that ext4dev was compiled into that kernel. Before ext4 became fully incorporated in the newer kernels, it was in development stage.

svar 09-17-2009 12:12 PM

Quote:

hugesmp.s root=/dev/hda1 noinitrd ro
no, this does not work directly. It does not use the fs on /dev/hda1, but it lets you mount it. Then you need to change all of lilo.conf so that instead of /boot it says /mnt/Slack13/boot, and invoke it from
/mnt/Slack13/sbin/lilo, but it still gives warning about the partition and
fais because it cannot find /boot/map
Quote:

mount -t ext4dev /dev/sdb3 /mnt/root
Nice try, but no luck...
Quote:

mount: wrong fs type, bad option, bad superblock on /dev/sdb3,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

plasmonics 09-17-2009 12:44 PM

Quote:

Nice try, but no luck...
Then you must be using a kernel < 2.6.27.
I used the "ext4dev" switch this morning from openSUSE to copy a file from a ext4 Slackware partition to a ext3 suse partition.

If ext4* was compiled as a module instead of hard wired, you can search under /lib/modules for "ext4*.ko".

gegechris99 09-17-2009 01:45 PM

Quote:

Originally Posted by svar (Post 3687234)
no, this does not work directly. It does not use the fs on /dev/hda1, but it lets you mount it.

Did you install Slackware 13.0 on /dev/hda1? I'm asking because you used /dev/sdb3 for the mount command.

Please modify /dev/hda1 with the partition where root directory of Slackware 13.0 was installed. For example:

Code:

hugesmp.s root=/dev/sdb3 noinitrd ro

svar 09-17-2009 01:53 PM

Yes, of course I installed on /dev/sdb3
and I used
hugesmp.s root=/dev/sdb3 noinitrd ro

I only mentioned /dev/hda1 so we can have a common reference for "wherever root is"

svar 09-17-2009 01:54 PM

Yes, this kernel is
2.6.18


All times are GMT -5. The time now is 01:52 AM.