Welcome! Log In Create A New Profile

Advanced

Rootfs on f2fs or btrfs, is possible?

Posted by mgiammarco 
Rootfs on f2fs or btrfs, is possible?
December 20, 2013 04:30AM
Hello,
I would like to try using f2fs or btrfs as root filesystem of my usb key for my goflex.
Is it possible?
What do I need to put on uboot?

Thanks,
Mario
Re: Rootfs on f2fs or btrfs, is possible?
December 20, 2013 03:47PM
You can use f2fs as rootfs, but the /boot needs to be in ext2 or ext3 partition. So

- create 2 partitions on your USB thumb using fdisk. 1st partition is bootable Linux, second is normal Linux.
- format the 1st partition as ext2 or ext3
- format the 2nd partition as f2fs
- extract rootfs to 2nd partition (see rootfs download and instruction in my signature)
- copy /boot to 1st partition as root (asuming they are mounted at /media):
cp -aR /media/part2/boot /media/part1/
- label 2nd partition rootfs
- sync

Boot with this USB key. And let us know!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Rootfs on f2fs or btrfs, is possible?
January 31, 2016 07:29PM
So I gave this a try today. I basically followed the instruction from bodhi, but instead of download a new rootfs, I just used the one that I already setup. Basically I made the ext3 and f2fs partitions, cp -a to copy the rootfs to f2fs partition, and the cp -a to move the /boot to the ext3 partition.

The system didn't boot up successfully. From the netconsole I can see that the uboot was able to load the kernel and then there was no output.

I am wondering what could go wrong. Should I edit the fstab somehow? For fstab, should also mount the ext3 partition to /boot?
Re: Rootfs on f2fs or btrfs, is possible?
January 31, 2016 11:30PM
auzn Wrote:
-------------------------------------------------------
> So I gave this a try today. I basically followed
> the instruction from bodhi, but instead of
> download a new rootfs, I just used the one that I
> already setup. Basically I made the ext3 and f2fs
> partitions, cp -a to copy the rootfs to f2fs
> partition, and the cp -a to move the /boot to the
> ext3 partition.
>

That should be cp -aR

> The system didn't boot up successfully. From the
> netconsole I can see that the uboot was able to
> load the kernel and then there was no output.
>

netconsole does not output more after the kernel is starting. Unless you explicitly set it up to output more in Debian/Arch.

> I am wondering what could go wrong. Should I edit
> the fstab somehow? For fstab, should also mount
> the ext3 partition to /boot?

No. The f2fs partition needs to have a label rootfs, and the u-boot envs need use that for root. See explanation here:
http://forum.doozan.com/read.php?3,19093

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Rootfs on f2fs or btrfs, is possible?
February 01, 2016 09:16AM
Quick question about cp -aR, what is the difference between -a and -aR? I see on the man page of cp that -a means -dR --preserve=all, so I thought -a and -aR has the same effect.



Edited 1 time(s). Last edit at 02/01/2016 02:31PM by auzn.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: