Southtown Posted June 5, 2009 Report Posted June 5, 2009 #mkdir /mnt/lfs/tools ...OK#chown lfs /mnt/lfs/tools ...Operation not permitted K what am I doing wrong? I thought that the LFS book said vfat was supported ...but I can't find that page right now. All I can find is this page saying only e2, e3, reiser, and xfs. But I don't think I can get grub to work on my stick so I want vfat so I can use syslinux. mount -l says the usb is mounted rw, so wtf? I got as far as glibc 2nd pass on reiserfs usb. P.S. I boot into an LFS livecd image located on my Arch partition, then mount both Arch and the usb then link to them from root. Quote
Southtown Posted July 17, 2009 Author Report Posted July 17, 2009 Permission problem on fvat merely required mounting with umask/fmask. But symlinks are not possible on vfat so oh well. Quote
alexander Posted July 17, 2009 Report Posted July 17, 2009 Why are you putting all that straight down on the usb drive? wouldn't it make more sense to use squashfs or something and only manage the vfat boot partition with a boot loader, kernel and system config on there? Just curious, it just seems like you are doing this a bit backwards, to me... Quote
alexander Posted July 17, 2009 Report Posted July 17, 2009 as far as syslinux goes, you only need two files on there ldlinux.sys and syslinux.cfg and your kernel for a successful boot. then run through the syslinux cfg ex:default Linuxlabel Linuxkernel bzImageappend root=/dev/hdc and that should boot your kernel. So then you just need a kernel with squashfs, and perhaps compression built in to pull up the rest of your data...? I dunno i haven't built a live distro in a while, but as far as i recall, that is basically how the boot process went? Quote
Southtown Posted July 17, 2009 Author Report Posted July 17, 2009 Why are you putting all that straight down on the usb drive? wouldn't it make more sense to use squashfs or something and only manage the vfat boot partition with a boot loader, kernel and system config on there? Just curious, it just seems like you are doing this a bit backwards, to me...Well it was just a learning exercise. Are you saying I put linux on one partition and the /boot on vfat, or am I not understanding you? as far as syslinux goes, you only need two files on there ldlinux.sys and syslinux.cfg and your kernel for a successful boot. then run through the syslinux cfg ex:default Linuxlabel Linuxkernel bzImageappend root=/dev/hdc and that should boot your kernel. So then you just need a kernel with squashfs, and perhaps compression built in to pull up the rest of your data...? I dunno i haven't built a live distro in a while, but as far as i recall, that is basically how the boot process went?Thanks for the tips. I don't know anything about squashfs, is it just like a different partition type? I never got far enough to setup a bootloader, or kernel for that matter. After trying/retrying different versions of 64-bit LFS, I finally got x86 to build all the way through (on ext2,) but I had to use my USB for an Arch reinstall (after an update that weeded out a lot of us noobs.) I did save my 32-bit LFS tookit, tho. I think I'm gonna wait for 64-bit to mature a little, then retry. Quote
alexander Posted July 17, 2009 Report Posted July 17, 2009 Squashfs is a compressed read-only file system in linux SquashFS - Wikipedia, the free encyclopedia Its great for these distributions to put all your system stuff in there and whatnot Let me see if i can dig up some docu for you for building live distributions, and creating bootable sectors and using squashfs and making ram disks and whatnot Quote
Southtown Posted July 17, 2009 Author Report Posted July 17, 2009 Many thanks. From what I've read flash drives need an offset in their partitions to compensate for boot sectors. And of course squash would obviously be beneficial. I don't know why i didn't think of the seperate /boot partition, duh. Quote
alexander Posted July 21, 2009 Report Posted July 21, 2009 Ok, so here's what i have come up with for your delema :lol: First of all, use grub, it wont have problems performing, on the USB drive, just make a small ext4 partition for grub and all your favorite magical boot files (like 35m would do, actually even less, that depends on your kernel), the rest you can mount as squash, and consider even making a small ram-disk partition for home directories and whatnot. You can probably make a swap-less boot, and try to maximize your kernel to be as lean as possible, but be able to support as much hardware (reasonably) as possible through the use of modules (remember anything that is not needed from the get-go, should be modularized)... I think i would start with:Partitioning the drivesetting up the ext4 partition for grub bootcreating a temporary working directory (ies) to be later converted to squashfs partitioncreating your distro, installing kernel, drivers, what have you, making sure it all works (by booting using that kernel, and then chrooting into it) installing/testing software, etc.Finally cleaning up all the logs, documentation (that takes up tons of space), finally squashing the system and dding it to a squash partition on your thumb drive. (remember you will need usb support built in, lzma, and squasfs as well as ext4 built inito the kenrel) Finally, ofcourse testing all that :wave: Hope some of this helpshere are some random references:USB boot on LinuxLinux Convert ext3 to ext4 File systemHow to make a live CD/DVD from your harddisk installation - Ubuntu ForumsSquashFS HOWTO within those, you should get a really great idea on how you will go about building your lfs on usb system... enjoy :) Quote
Southtown Posted July 22, 2009 Author Report Posted July 22, 2009 You rock man. :) Will try that and let you know how it goes. Quote
Southtown Posted August 3, 2009 Author Report Posted August 3, 2009 Quick question. I backed up my first run toolkit on my ntfs and so now all the permissions are -r--------. I read about using find with chmod to sort through directories and files, but then it occurred to me that some of those files should be executable. Is there any way to find those also or should I just rebuild the first toolkit? Edit: I could just make 'em all executable. Hell it's all temporary anyway. Quote
alexander Posted August 4, 2009 Report Posted August 4, 2009 now thats a bad attitude, its no excuse, unless you absolutely have to, to make everything executable... thats just asking for trouble.. Quote
Southtown Posted August 4, 2009 Author Report Posted August 4, 2009 Yep! I'll let ya know how it goes. haha Edit: OK, I'll try it with no executables, but first error I come across getsa global chmod +x. haha Quote
Southtown Posted August 4, 2009 Author Report Posted August 4, 2009 That was fast.chroot: cannot run command `/tools/bin/env': Permission denied Quote
Southtown Posted August 4, 2009 Author Report Posted August 4, 2009 And again, that was fast. Afterroot [ /mnt/lfs/tools ]# find . -type f -exec chmod -v 755 '{}' ;I getchroot: cannot run command `/tools/bin/env': Input/output errorSigh. Rebuild it is. *#$)%& microsoft Let that be a lesson to all! Thou shalt not backup linux files on vfat or ntfs... o_O Quote
alexander Posted August 4, 2009 Report Posted August 4, 2009 Yeah.. There is a reason EXT4 is just a superior file system :) Quote
Southtown Posted August 4, 2009 Author Report Posted August 4, 2009 Well, I guess I could've backed it up in windows if I zipped it first. Also, I think I got the error that I did after making everything executable because I forgot to do all the important stuff before trying to chroot into a blank partition.mkdir -pv $LFS/{dev,proc,sys} mknod -m 600 $LFS/dev/console c 5 1 mknod -m 666 $LFS/dev/null c 1 3 mount -v --bind /dev $LFS/dev mount -vt devpts devpts $LFS/dev/pts mount -vt tmpfs shm $LFS/dev/shm mount -vt proc proc $LFS/proc mount -vt sysfs sysfs $LFS/sys Quote
alexander Posted August 5, 2009 Report Posted August 5, 2009 well, you can always just start over again :cup: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.