Release Engineering

Tasklist

FS#14919 - Vfat support to initrd on installcd.

Attached to Project: Release Engineering
Opened by Robert David (robert.david) - Tuesday, 02 June 2009, 11:44 GMT
Last edited by Aaron Griffin (phrakture) - Tuesday, 01 December 2009, 20:51 GMT
Task Type Feature Request
Category ArchISO
Status Closed
Assigned To Aaron Griffin (phrakture)
Gerhard Brauer (GerBra)
Architecture All
Severity Medium
Priority Normal
Reported Version 2009.02
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

It is very handy to have archlinux (and another linuxes) instaled on flash drive (when there is no cdrom), but not everyone use ext2/3 on it. It is pretty easy to coppy livecd content to flashdrive and add syslinux option, but initrd doesnt find root because it forces to mount the flash as ext2. I think that it would be better to set this to auto and add most common kernel filesystem modules (vfat,dosfs,ext2) used on flash disks.
This task depends upon

Closed by  Aaron Griffin (phrakture)
Tuesday, 01 December 2009, 20:51 GMT
Reason for closing:  Implemented
Additional comments about closing:  Fixed in git
Comment by Tobias Powalowski (tpowa) - Wednesday, 22 July 2009, 05:47 GMT
archboot does support that, official media i don't know.
Comment by Aaron Griffin (phrakture) - Friday, 31 July 2009, 18:09 GMT
This sounds ok to me. What do you guys think? We could just add the module to the mkinitcpio config
Comment by Dieter Plaetinck (Dieter_be) - Friday, 31 July 2009, 20:41 GMT
sounds good to me. but i'm not familiar enough with this to see any disadvantages.
Comment by Gerhard Brauer (GerBra) - Friday, 31 July 2009, 22:08 GMT
AFAIK this should be already possible with 2009.08-beta1 images (during the change in boot-device detection).
We have had vfat always as module in initrd images, with new boot device detection we don't mount explicit a ext2 FS anymore, we use:
eval $(fstype < /dev/archiso 2>/dev/null)
if [ -n "${FSTYPE}" -a "${FSTYPE}" != "unknown" ]; then
if mount -r -t "${FSTYPE}" /dev/archiso /bootmnt >/dev/null 2>&1; then
...........

So @Robert: would you please test 2009.08-beta1 (http://build.archlinux.org/isos/) if it fits your request without we have to modify anything...
Comment by ilya (leniviy) - Monday, 05 October 2009, 10:46 GMT
Hi. fstype doesn't detect vfat!

Used archlinux-2009.08-core-i686.img.
Inflated to 2gb vfat partition.
On boot, /dev/sda is internal HDD and /dev/sdb is USB HDD.
/dev/archiso is created, but not mounted. (To be able to enter the prompt mode, I used boot option: archisolabel=INVALID)
*************************
ramfs$ fstype < /dev/sda1
FSTYPE=ext3
FSSIZE=858.....
ramfs$ fstype < /dev/sdb1
FSTYPE=unknown
FSSIZE=0
ramfs$ mount -r -t vfat /dev/sdb1 /bootmnt
ramfs$ echo /bootmnt/isom*
/bootmnt/isomounts
*************************
so sdb1 can be mounted, but fstype not detecting it's type
Comment by Dieter Plaetinck (Dieter_be) - Monday, 05 October 2009, 16:04 GMT
removed myself from assignees. i don't care about vfat.
Comment by Aaron Griffin (phrakture) - Monday, 05 October 2009, 19:32 GMT
So you're doing something crazy and unsupported... what are you expecting to happen?

fstype actually does not detect fat32....

If you want to make the archiso boot on a fat32 device, you're going to have to hand edit the scripts or post patches. I have no interest in doing any work to support this.
Comment by ilya (leniviy) - Tuesday, 06 October 2009, 07:26 GMT
Ok, modified. hope someone finds this useful:
***************
eval $(fstype < /dev/archiso 2>/dev/null)
if [ -z "${FSTYPE}" -o "${FSTYPE}" = "unknown" ]; then
echo "WARNING: /dev/archiso found, but the filesystem type is unknown. Assuming vfat"
FSTYPE=vfat
fi

if mount -r -t "${FSTYPE}" /dev/archiso /bootmnt >/dev/null 2>&1; then
if [ -e "/bootmnt/isomounts" ]; then
echo "SUCCESS: Mounted archiso volume successfully."
else
echo "ERROR: Mounting was successful, but the isomounts file does not exist."
exit 1
fi
else
echo "ERROR: Failed to mount /dev/archiso"
exit 1
fi
***************
Comment by Aaron Griffin (phrakture) - Tuesday, 06 October 2009, 15:41 GMT
vfat support actually is in the code now that I look at it.
http://projects.archlinux.org/?p=archiso.git;a=commitdiff;h=fd93e7c9bd614a026f1d661f359012a4c1e080d7

However, I think this problem results from your "archisolabel=INVALID" setting. What is /dev/archiso symlinked too? Is your usb device ACTUALLY labeled "INVALID" ?
Comment by ilya (leniviy) - Wednesday, 07 October 2009, 11:20 GMT
Thanks for the link. Looks like it will be solved in next release.
archisolabel=INVALID was just to get interactive console to test fstype. With correct archisolabel /dev/archiso was created, not mounted and kernel panic as the result.
Comment by Aaron Griffin (phrakture) - Wednesday, 07 October 2009, 16:55 GMT
@Gerhard: Was this vfat support added before or after the last release?
Comment by ilya (leniviy) - Thursday, 08 October 2009, 06:05 GMT
after.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 14 November 2009, 01:40 GMT
Is this bug still relevant? I posted a feature request for vfat and udf on the klibc mailing list, hoping that fstype will be able to recognize file systems a it better: http://www.zytor.com/pipermail/klibc/2009-November/002467.html
Are we going to wait or implement hacky solutions? I think we should switch to the mount way of recognizing fs types which makes use of blkid. Actually, why not just let mount do its thing? Is there any gain in making fstype probe for the fs type when mount is better at that?
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 21 November 2009, 16:02 GMT
@Svenstaro: The current archiso hook support detection of fstype, so works fine when copy the files "*.sqfs isomounts boot/*" to a VFAT partition and setup the grub on it. The only issue is the "archisolabel", it has more than 11 chars allowed for use in VFAT label (archiso_NNNNNNNN), so won't work without changing it. So the steps are setting a dosfslabel on the vfat media and edit boot/grub/menu.lst to match this custom label.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 21 November 2009, 18:49 GMT
This doesn't quite address my question though. Why do we rely on fstype when mount uses blkid which detects more file systems? For example, fstype can't do udf which is quite annoying for me.
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 21 November 2009, 18:53 GMT
mmm maybe is better to open a separate feature request for it. This topic is centered on vfat support that is done now.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 21 November 2009, 19:28 GMT Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 24 November 2009, 01:22 GMT
  • Field changed: Percent Complete (0% → 90%)
The only thing remain is fix the label for the filesystem: "ARCHISO_NNNNNNN" is longer than 11 chars supported by VFAT.

Is there any objetion in changing this label to ARCH_XXXXXX ?

-export LABEL="ARCHISO_$(pwgen -n 8 1 | tr [a-z] [A-Z])"
+export LABEL="ARCH_$(pwgen -n 6 1 | tr [a-z] [A-Z])"

With this, users only need to edit the label in your target media without changing grub/menu.lst.
Comment by Aaron Griffin (phrakture) - Wednesday, 25 November 2009, 17:41 GMT
I wonder why we even use pwgen here. Why not make the label "ARCH_200912" or something. It fits perfectly and makes far more sense.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 25 November 2009, 18:50 GMT
Sure!, a trivial patch for this is attached.

push -> close task :)

Loading...