[lfs-support] Building LFS on a usb drive
After a long thread on -support today I did a test build on a USB drive today. These are some observations. The USB drive was /dev/sdg. I only had one partition on the MSDOS style partition table. From the host I installed GRUB with grub-install /dev/sdg To boot, I needed a grub.cfg file: # Begin /boot/grub/grub.cfg set default=0 set timeout=5 insmod ext2 set root=(hd0,1) menuentry "GNU/Linux, vmlinuz-5.0-lfs-SVN-20190305" { linux /boot/vmlinuz-5.0-lfs-SVN-20190305 rootdelay=10 root=/dev/sdg1 ro } When booting, I had to tell the system firmware (BIOS) to boot from the USB drive. In grub.cfg the line set root=(hd0,1) refers to GRUB's view of the system where it thinks the boot drive is hd0. This allows GRUB to find the kernel, load it and then start it. The kernel, on the other hand, searches the entire system for hard drives and identifies them as it finds them. In my case I have six hard drives in the system. sda, sdb, sdc, sdd, sde, and sdf. The USB drive is thus identified as sdg. The linux boot line then requires root=/dev/sdg1 rootdelay=10 The rootdelay is needed so the system has time to find the USB drive, but /dev/sdg1 is needed for the kernel to find the root partition. The fstab file also needs the same drive designations as the kernel command line. If this USB drive is inserted into another system with a different disk configuration, then these values will need to be changed. The workaround is to use UUID or PARTUUID designations. PARTUUID is only available on GPT partition tables [sic], but plain UUID requires an initrd to be created and loaded by GRUB. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 3/19/19 4:54 PM, Pei Jia wrote: Hi, Pierre and Bruce: My bad... I tried */dev/sdd1*, and it's *working* :'(:'( There are still some *errors*: https://longervision.cc/bugs/booting_bugs.jpg And it's seriously basic, but it's already 1.1 Giga? No command *adduser*, *addgroup*? Try useradd and groupadd. Any further suggestions? What's *NEXT*? *blfs*? You can try http://www.linuxfromscratch.org/blfs/view/basic/ but it is a little out of date. It is designed to be a gentle into to BLFS. So far, I didn't use *systemd*, is *systemd* *preferred*? Not in my mind. IMO systemd is meant to make things easier for distros, not users. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
Hi, Pierre and Bruce: My bad... I tried */dev/sdd1*, and it's *working* :'(:'( There are still some *errors*: https://longervision.cc/bugs/booting_bugs.jpg And it's seriously basic, but it's already 1.1 Giga? No command *adduser*, *addgroup*? hmmm.. Any further suggestions? What's *NEXT*? *blfs*? So far, I didn't use *systemd*, is *systemd* *preferred*? Cheers Pei On 2019-03-19 2:32 p.m., Pei Jia wrote: Hi, Bruce, this is *already* my current *grub.cfg on USB stick*. All the bugs I posted are just with this *grub.cfg*: /➜ grub cat grub.cfg // //# Begin /boot/grub/grub.cfg// //set default=0// //set timeout=5// // //insmod part_msdos// //insmod ext2// //set root=(hd0,msdos1)// // //menuentry "GNU/Linux, Linux 5.0.2-lfs-8.5" {// // linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=/dev/sda1 ro// //}/ I may have to try using *gpt* as *Partition table* ? cheers Pei On 2019-03-19 12:49 p.m., Bruce Dubbs wrote: On 3/19/19 1:55 PM, Pei Jia wrote: Hi, Thank you Pierre and Bruce: 1. Right now, I booted into my laptop's Ubuntu 18.04.2, and /dev/sde1 corresponds to my USB stick for sure, as I can definitely see the following line: ➜ ~ sudo blkid ... /dev/sde1: LABEL="skyvision-3.0" UUID="d8a7b940-0ff5-41c4-81a0-9fd1797501ed" TYPE="ext4" PARTUUID="0860eda0-01" ... 2. However, when I *reboot*, after pressing *ESC*, I entered *grub >* : if I do *ls*, I'm 100% sure (hd0), (hd0,msdos1) corresponds to my *USB stick drive* and *partition* respectively, as I can do: *set root=(hd0,msdos1)* *cat /boot/grub/grub.cfg* which I can easily tell it is just the grub I put under the *USB stick's /boot/grub/ folder*, which is of course, totally different from the one on my laptop's 3. So, I believe there might be 2 possible reasons? From this picture: https://longervision.cc/bugs/gparted.jpg * My USB stick is NOW of a *msdos partition table*, but *ext4 filesystem*, is that OK? As mentioned by William that I may *NOT* have *vfat* built into the *kernel*. I'll check it again... * On this page: http://www.linuxfromscratch.org/lfs/view/development/chapter08/grub.html, I *didn't *do *grub-install* at all (under lfs configuration and on the USB stick). However, I did *sudo update-grub* to have my *host laptop's grub updated*, which seems working properly, because it *did successfully detect and add the booting info* under*/dev/sde1* to my *host laptop's grub.cfg*. And... how can I detect if *EXT4* *module* is successfully loaded by the *LFS kernel*? It seems *EXT4 is NOT a module*, but *built into kernel by default *already? If you top post again after we have asked you not to do so several times, I will not answer again. An msdos filesystem is OK. You can make any type of filesystem on any partition. GRUB is finding your kernel just fine. The problem is how the kernel recognizes the disk. When you boot and get the grub prompt, type e for edit and change the root= line to /dev/sda1 on the *linux* line. Do *not* change the line that says set root=(hd0,msdos1). That part is working properly. If that doesn't work, try different variations sdb1, sdc1, sdc1, etc. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
Hi, Bruce, this is *already* my current *grub.cfg on USB stick*. All the bugs I posted are just with this *grub.cfg*: /➜ grub cat grub.cfg // //# Begin /boot/grub/grub.cfg// //set default=0// //set timeout=5// // //insmod part_msdos// //insmod ext2// //set root=(hd0,msdos1)// // //menuentry "GNU/Linux, Linux 5.0.2-lfs-8.5" {// // linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=/dev/sda1 ro// //}/ I may have to try using *gpt* as *Partition table* ? cheers Pei On 2019-03-19 12:49 p.m., Bruce Dubbs wrote: On 3/19/19 1:55 PM, Pei Jia wrote: Hi, Thank you Pierre and Bruce: 1. Right now, I booted into my laptop's Ubuntu 18.04.2, and /dev/sde1 corresponds to my USB stick for sure, as I can definitely see the following line: ➜ ~ sudo blkid ... /dev/sde1: LABEL="skyvision-3.0" UUID="d8a7b940-0ff5-41c4-81a0-9fd1797501ed" TYPE="ext4" PARTUUID="0860eda0-01" ... 2. However, when I *reboot*, after pressing *ESC*, I entered *grub >* : if I do *ls*, I'm 100% sure (hd0), (hd0,msdos1) corresponds to my *USB stick drive* and *partition* respectively, as I can do: *set root=(hd0,msdos1)* *cat /boot/grub/grub.cfg* which I can easily tell it is just the grub I put under the *USB stick's /boot/grub/ folder*, which is of course, totally different from the one on my laptop's 3. So, I believe there might be 2 possible reasons? From this picture: https://longervision.cc/bugs/gparted.jpg * My USB stick is NOW of a *msdos partition table*, but *ext4 filesystem*, is that OK? As mentioned by William that I may *NOT* have *vfat* built into the *kernel*. I'll check it again... * On this page: http://www.linuxfromscratch.org/lfs/view/development/chapter08/grub.html, I *didn't *do *grub-install* at all (under lfs configuration and on the USB stick). However, I did *sudo update-grub* to have my *host laptop's grub updated*, which seems working properly, because it *did successfully detect and add the booting info* under*/dev/sde1* to my *host laptop's grub.cfg*. And... how can I detect if *EXT4* *module* is successfully loaded by the *LFS kernel*? It seems *EXT4 is NOT a module*, but *built into kernel by default *already? If you top post again after we have asked you not to do so several times, I will not answer again. An msdos filesystem is OK. You can make any type of filesystem on any partition. GRUB is finding your kernel just fine. The problem is how the kernel recognizes the disk. When you boot and get the grub prompt, type e for edit and change the root= line to /dev/sda1 on the *linux* line. Do *not* change the line that says set root=(hd0,msdos1). That part is working properly. If that doesn't work, try different variations sdb1, sdc1, sdc1, etc. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 3/19/19 1:55 PM, Pei Jia wrote: Hi, Thank you Pierre and Bruce: 1. Right now, I booted into my laptop's Ubuntu 18.04.2, and /dev/sde1 corresponds to my USB stick for sure, as I can definitely see the following line: ➜ ~ sudo blkid ... /dev/sde1: LABEL="skyvision-3.0" UUID="d8a7b940-0ff5-41c4-81a0-9fd1797501ed" TYPE="ext4" PARTUUID="0860eda0-01" ... 2. However, when I *reboot*, after pressing *ESC*, I entered *grub >* : if I do *ls*, I'm 100% sure (hd0), (hd0,msdos1) corresponds to my *USB stick drive* and *partition* respectively, as I can do: *set root=(hd0,msdos1)* *cat /boot/grub/grub.cfg* which I can easily tell it is just the grub I put under the *USB stick's /boot/grub/ folder*, which is of course, totally different from the one on my laptop's 3. So, I believe there might be 2 possible reasons? From this picture: https://longervision.cc/bugs/gparted.jpg * My USB stick is NOW of a *msdos partition table*, but *ext4 filesystem*, is that OK? As mentioned by William that I may *NOT* have *vfat* built into the *kernel*. I'll check it again... * On this page: http://www.linuxfromscratch.org/lfs/view/development/chapter08/grub.html, I *didn't *do *grub-install* at all (under lfs configuration and on the USB stick). However, I did *sudo update-grub* to have my *host laptop's grub updated*, which seems working properly, because it *did successfully detect and add the booting info* under*/dev/sde1* to my *host laptop's grub.cfg*. And... how can I detect if *EXT4* *module* is successfully loaded by the *LFS kernel*? It seems *EXT4 is NOT a module*, but *built into kernel by default *already? If you top post again after we have asked you not to do so several times, I will not answer again. An msdos filesystem is OK. You can make any type of filesystem on any partition. GRUB is finding your kernel just fine. The problem is how the kernel recognizes the disk. When you boot and get the grub prompt, type e for edit and change the root= line to /dev/sda1 on the *linux* line. Do *not* change the line that says set root=(hd0,msdos1). That part is working properly. If that doesn't work, try different variations sdb1, sdc1, sdc1, etc. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
Hi, Thank you Pierre and Bruce: 1. Right now, I booted into my laptop's Ubuntu 18.04.2, and /dev/sde1 corresponds to my USB stick for sure, as I can definitely see the following line: ➜ ~ sudo blkid ... /dev/sde1: LABEL="skyvision-3.0" UUID="d8a7b940-0ff5-41c4-81a0-9fd1797501ed" TYPE="ext4" PARTUUID="0860eda0-01" ... 2. However, when I *reboot*, after pressing *ESC*, I entered *grub >* : if I do *ls*, I'm 100% sure (hd0), (hd0,msdos1) corresponds to my *USB stick drive* and *partition* respectively, as I can do: *set root=(hd0,msdos1)* *cat /boot/grub/grub.cfg* which I can easily tell it is just the grub I put under the *USB stick's /boot/grub/ folder*, which is of course, totally different from the one on my laptop's 3. So, I believe there might be 2 possible reasons? From this picture: https://longervision.cc/bugs/gparted.jpg * My USB stick is NOW of a *msdos partition table*, but *ext4 filesystem*, is that OK? As mentioned by William that I may *NOT* have *vfat* built into the *kernel*. I'll check it again... * On this page: http://www.linuxfromscratch.org/lfs/view/development/chapter08/grub.html, I *didn't *do *grub-install* at all (under lfs configuration and on the USB stick). However, I did *sudo update-grub* to have my *host laptop's grub updated*, which seems working properly, because it *did successfully detect and add the booting info* under*/dev/sde1* to my *host laptop's grub.cfg*. And... how can I detect if *EXT4* *module* is successfully loaded by the *LFS kernel*? It seems *EXT4 is NOT a module*, but *built into kernel by default *already? Thank you very much. On 2019-03-19 10:33 a.m., Pierre Labastie wrote: On 19/03/2019 16:59, Bruce Dubbs wrote: On 3/19/19 10:01 AM, Pierre Labastie wrote: On 19/03/2019 14:57, William Harrington wrote: On Mon, 18 Mar 2019 16:20:32 -0700 Pei Jia wrote: Hey all. The problem is with the linux command line in grub.cfg and/or the drivers in the kernel. Note that he *IS* booting kernel. GRUB is finding it just fine. Hmm, possible, but since the grub prompt comes clearly from ubuntu, isn't it the ubuntu kernel? I have this doubt that according to one of the pictures, /dev/sdd is 15GB, while /dev/sde is 5TB. Pei, when you say "an USB drive", is it the 5TB one or the 15GB one? Also, /dev/sde has 2 partitions. And /dev/sde1 seems to be a FAT filesystem (if this is the one that is mounted)... I'd believe the right partition to mount is /dev/sdd1, but update-grub seems to have generated /dev/sde1... Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] coreutis-8.30 multibyte problem
> El 19 mar 2019, a las 17:14, Bruce Dubbs escribió: > > On 3/19/19 11:05 AM, José Carlos Carrión Plaza wrote: >> Enviado desde mi iPhone >>> El 19 mar 2019, a las 14:46, Pierre Labastie >>> escribió: >>> On 19/03/2019 13:43, José Carlos Carrión Plaza wrote: Hello co-listers: I’ve installed LFS 8.4. I’ve built several BLFS packages without problem and X-Window is running (with motif-2.3.8). At the booting of MariadB I’ve detected the following problem: -bash-5.0# echo foobar | LANG=POSIX cut -c4 b -bash-5.0# echo foobar | LANG=en_US.iso8859-1 cut -c4 b -bash-5.0# echo foobar | LAN=en_US.utf8 cut -c4 >>> >>> Seems "G" is missing at the end of "LAN". >>> -bash-5.0# I’m almost sure I’ve properly applied the coreutils-8.30-i18n-1.patch at LFS chapter 6. Just in case, I’ve rebuilt coreutils-8.30 applying patch with a clean environment: -bash-5.0$ env -i TERM="$TERM" HOME=“$HOME" PATH="/bin:/sbin:/usr/bin:/usr/sbin" LC_ALL=POSIX /bin/bash bash-5.0$ I’ve built coreutils (with patch, indeed) as LFS book reads without problem and all tests passed, but test-getlogin as expected. The problem with cut command remains. What (and where) I’ve made the mistake? Is it safe to continue? > >> Of course. It’s a typo. >> -bash-5.0# echo foobar | LANG=en_US.utf8 cut -c4 >> gives no output > > It does for me: > > $ echo foobar | LANG=en_US.utf8 cut -c4 > b > > — Bruce > Maybe the architecture? I’m on i686… > > > -- > http://lists.linuxfromscratch.org/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > > Do not top post on this list. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > http://en.wikipedia.org/wiki/Posting_style -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 19/03/2019 16:59, Bruce Dubbs wrote: On 3/19/19 10:01 AM, Pierre Labastie wrote: On 19/03/2019 14:57, William Harrington wrote: On Mon, 18 Mar 2019 16:20:32 -0700 Pei Jia wrote: Hey all. The problem is with the linux command line in grub.cfg and/or the drivers in the kernel. Note that he *IS* booting kernel. GRUB is finding it just fine. Hmm, possible, but since the grub prompt comes clearly from ubuntu, isn't it the ubuntu kernel? I have this doubt that according to one of the pictures, /dev/sdd is 15GB, while /dev/sde is 5TB. Pei, when you say "an USB drive", is it the 5TB one or the 15GB one? Also, /dev/sde has 2 partitions. And /dev/sde1 seems to be a FAT filesystem (if this is the one that is mounted)... I'd believe the right partition to mount is /dev/sdd1, but update-grub seems to have generated /dev/sde1... Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
On Tue, Mar 19, 2019, 11:12 AM Bruce Dubbs wrote: > On 3/19/19 2:25 AM, niuneilneo wrote: > > As described in the title, the $LFS/tools setting could be harmful for > > the current linux distros. Because there already exists /tools folder in > > current Debian/Ubuntu distros, and it is not possible to correctly set > > the symlink between the $LFS/tools and /tools. Even if I brutally delete > > the /tools folder, and set the symlink, the host system will complain > > that "Too many levels of symbolic links" for simple commands like tar, > > and all LFS operations following will not be able to execute. > > > > I wonder this problem is caused by the dead cycle between the /tools and > > $LFS/tools. So I suggest totally remove this setting or warn user not to > > set this variable when some host distros default have /tools in their > > root folder. > > We need to verify this. What specific version of Debian has /tools? > LFS has used /tools for almost 20 years. I think it is unlikely that > Debian started to use it. > Debian Testing didn't have it last time I tried. OP, what version of Debian and/or Ubuntu did you use to find this? We need to verify for ourselves. The only purpose I can think of for Debian to use /tools is to hide a recovery system that can be used in the event of a failed update. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] coreutis-8.30 multibyte problem
On 3/19/19 11:05 AM, José Carlos Carrión Plaza wrote: Enviado desde mi iPhone El 19 mar 2019, a las 14:46, Pierre Labastie escribió: On 19/03/2019 13:43, José Carlos Carrión Plaza wrote: Hello co-listers: I’ve installed LFS 8.4. I’ve built several BLFS packages without problem and X-Window is running (with motif-2.3.8). At the booting of MariadB I’ve detected the following problem: -bash-5.0# echo foobar | LANG=POSIX cut -c4 b -bash-5.0# echo foobar | LANG=en_US.iso8859-1 cut -c4 b -bash-5.0# echo foobar | LAN=en_US.utf8 cut -c4 Seems "G" is missing at the end of "LAN". -bash-5.0# I’m almost sure I’ve properly applied the coreutils-8.30-i18n-1.patch at LFS chapter 6. Just in case, I’ve rebuilt coreutils-8.30 applying patch with a clean environment: -bash-5.0$ env -i TERM="$TERM" HOME=“$HOME" PATH="/bin:/sbin:/usr/bin:/usr/sbin" LC_ALL=POSIX /bin/bash bash-5.0$ I’ve built coreutils (with patch, indeed) as LFS book reads without problem and all tests passed, but test-getlogin as expected. The problem with cut command remains. What (and where) I’ve made the mistake? Is it safe to continue? Of course. It’s a typo. -bash-5.0# echo foobar | LANG=en_US.utf8 cut -c4 gives no output It does for me: $ echo foobar | LANG=en_US.utf8 cut -c4 b -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
On 3/19/19 2:25 AM, niuneilneo wrote: As described in the title, the $LFS/tools setting could be harmful for the current linux distros. Because there already exists /tools folder in current Debian/Ubuntu distros, and it is not possible to correctly set the symlink between the $LFS/tools and /tools. Even if I brutally delete the /tools folder, and set the symlink, the host system will complain that "Too many levels of symbolic links" for simple commands like tar, and all LFS operations following will not be able to execute. I wonder this problem is caused by the dead cycle between the /tools and $LFS/tools. So I suggest totally remove this setting or warn user not to set this variable when some host distros default have /tools in their root folder. We need to verify this. What specific version of Debian has /tools? LFS has used /tools for almost 20 years. I think it is unlikely that Debian started to use it. Changing /tools would be *very* invasive. I counted 86 files, including several in the stylesheets that match /tools. Not all of these matches refer to our /tools. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] coreutis-8.30 multibyte problem
Enviado desde mi iPhone > El 19 mar 2019, a las 14:46, Pierre Labastie > escribió: > >> On 19/03/2019 13:43, José Carlos Carrión Plaza wrote: >> Hello co-listers: >> >> I’ve installed LFS 8.4. I’ve built several BLFS packages without problem and >> X-Window is running (with motif-2.3.8). At the booting of MariadB I’ve >> detected the following problem: >> >> -bash-5.0# echo foobar | LANG=POSIX cut -c4 >> b >> -bash-5.0# echo foobar | LANG=en_US.iso8859-1 cut -c4 >> b >> -bash-5.0# echo foobar | LAN=en_US.utf8 cut -c4 > > Seems "G" is missing at the end of "LAN". > >> >> -bash-5.0# >> >> I’m almost sure I’ve properly applied the coreutils-8.30-i18n-1.patch at LFS >> chapter 6. Just in case, I’ve rebuilt coreutils-8.30 applying patch with a >> clean environment: >> >> -bash-5.0$ env -i TERM="$TERM" HOME=“$HOME" >> PATH="/bin:/sbin:/usr/bin:/usr/sbin" LC_ALL=POSIX /bin/bash >> bash-5.0$ >> >> I’ve built coreutils (with patch, indeed) as LFS book reads without problem >> and all tests passed, but test-getlogin as expected. >> The problem with cut command remains. >> >> What (and where) I’ve made the mistake? Is it safe to continue? >> >> Thanks in advance. >> >> Kind regards. >> >> J.C. > > -- > http://lists.linuxfromscratch.org/listinfo/lfs-support > FAQ: http://www.linuxfromscratch.org/blfs/faq.html > Unsubscribe: See the above information page > > Do not top post on this list. > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing in e-mail? > > http://en.wikipedia.org/wiki/Posting_style Of course. It’s a typo. -bash-5.0# echo foobar | LANG=en_US.utf8 cut -c4 gives no output -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 3/19/19 10:01 AM, Pierre Labastie wrote: On 19/03/2019 14:57, William Harrington wrote: On Mon, 18 Mar 2019 16:20:32 -0700 Pei Jia wrote: Hey all. The problem is with the linux command line in grub.cfg and/or the drivers in the kernel. Note that he *IS* booting kernel. GRUB is finding it just fine. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 19/03/2019 14:57, William Harrington wrote: On Mon, 18 Mar 2019 16:20:32 -0700 Pei Jia wrote: Hi, all: Thank you for your help so far... I make some progress, please refer to the following pictures... https://longervision.cc/bugs/gparted.jpg https://longervision.cc/bugs/grub.jpg https://longervision.cc/bugs/kernel_panic.jpg Hello Pei, This one shows ya mounted a vfat filesystem. I don't think the LFS build is there. Choose your rootfs carefully. As mentioned before, disconnect all drives and boot with only the USB device to make sure that works. As far as we know your rootfs could be at sda1 sdb2 sdc3 sdd4 sde1. Narrow it down. It also shows that /dev/sde is 5TB, while /dev/sdd is 15 GB, which seems to be closer to what an USB stick should be. You could try root=/dev/sdd on the "linux" command line. Also, what you could do (I hope you have a qwerty us keyboard, otherwise some keys are tricky to find): hit "c" when seeing the grub prompt (grup.jpg) type: set root=( You should see a list of possible drives, in the form hdx. You'll have to try all of them. For example, set root=(hd3, You should see a list of partitions, with filesystem information. If you have found the USB drive, there should be only one partition, say hd3,msdos1. Let us try that. Finish the command so: set root=(hd3,msdos1) then type: linux / You should see the listing of the / directory. If it seems OK (for example if there is a tools/ file), type: linux /boot/vm If you get vmlinuz-xxx (with xxx= what you have added when copying the kernel to the /boot directory) accept it, and finish the command with linux /boot/vmlinuz-xxx root=/dev/sdx1 ro where x is a if you found lfs on the hd0 drive, b if on hd1, etc (d in our example) then just type boot on a line by itself. HTH Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
On 3/19/19, Frans de Boer wrote: > On 19-03-19 10:19, Michael Shell wrote: >> On Tue, 19 Mar 2019 09:15:25 +0100 >> thomas wrote: >> >>> Renaming /tools to another name will be appropriate to come over this >>> issue. >> >> Perhaps a more functionally descriptive name would also help in other >> ways. After all, the stuff in /tools is for a *temporary* LFS system, >> a first stage of the LFS build process. >> >> So, perhaps a dir name such as "lfs_stage1" or "lfs_tmp_toolchain" would >> not only avoid the Debian namespace collision, but also would be more >> educational, potentially less confusing to the newbie, and functionally >> descriptive as well. >> >> Just my $0.02, >> > I already use for years now the link name 'lfs'. I build script files > and use a common include which contains the current link name. Easy when > I change the link name again, I only have to change it in the common > include file once. > > My 0,01 Euro cents ;) I like those variations. They're *cognitively friendly*, a reminder from whence that strange top level directory came. If length isn't a consideration, meaning considering so many directories are 3 to 5 characters long at that level, I like that "lfs_toolchain", even versus the slightly shorter "lfs_tool" variation. "Toolchain".. it's nice to see that. It made me just search to get the right feel via chatter out on the W-W-W. Surely others will do the same as part of the learning process, thus gaining and hopefully retaining an important piece of Linux nomenclature. Yeah, I know it's in the book, again it's that whole cognitive thing (*for some of us*). Helps to keep flashing that reminder. :) Additionally, being able to encounter that "lfs" on regular occasion at that level... that's a nice, not-so-subtle *visual* reminder to get back in there and GIT-R-DONE! That's especially true since you're talking about that one being temporary and thus to be deleted at some point deeper into our progress. Yeah, /tool has theoretically been there already serving in that capacity, BUT.. *in my case*, "tool" just sort of nuzzled its way in then hung out there innocuously with all the other... 4-letter-words in Debian's hierarchy. :D Cindy :) -- Talking Rock, North Georgia -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On Mon, 18 Mar 2019 16:20:32 -0700 Pei Jia wrote: > > Hi, all: > > > Thank you for your help so far... I make some progress, please refer to > the following pictures... > > > https://longervision.cc/bugs/gparted.jpg > > https://longervision.cc/bugs/grub.jpg > > https://longervision.cc/bugs/kernel_panic.jpg > > Hello Pei, This one shows ya mounted a vfat filesystem. I don't think the LFS build is there. Choose your rootfs carefully. As mentioned before, disconnect all drives and boot with only the USB device to make sure that works. As far as we know your rootfs could be at sda1 sdb2 sdc3 sdd4 sde1. Narrow it down. > > I'm pretty sure I've got *2 grubs*, *one on laptop*, *the other on USB > stick*. > > For now, I'm sure I boot from laptop's grub, ti comes to the > > *Kernel panic - not syncing: No working init found. Try passing init= > option to kernel.* > > *.. > * > > > Does that mean, *an initrd.img is a must?* > > > It seems I come to the final stage before make it installable > > > > Thanks You are close, just need to have rootfs be the right filesystem. Sincerely, William Harrington -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] coreutis-8.30 multibyte problem
On 19/03/2019 13:43, José Carlos Carrión Plaza wrote: Hello co-listers: I’ve installed LFS 8.4. I’ve built several BLFS packages without problem and X-Window is running (with motif-2.3.8). At the booting of MariadB I’ve detected the following problem: -bash-5.0# echo foobar | LANG=POSIX cut -c4 b -bash-5.0# echo foobar | LANG=en_US.iso8859-1 cut -c4 b -bash-5.0# echo foobar | LAN=en_US.utf8 cut -c4 Seems "G" is missing at the end of "LAN". -bash-5.0# I’m almost sure I’ve properly applied the coreutils-8.30-i18n-1.patch at LFS chapter 6. Just in case, I’ve rebuilt coreutils-8.30 applying patch with a clean environment: -bash-5.0$ env -i TERM="$TERM" HOME=“$HOME" PATH="/bin:/sbin:/usr/bin:/usr/sbin" LC_ALL=POSIX /bin/bash bash-5.0$ I’ve built coreutils (with patch, indeed) as LFS book reads without problem and all tests passed, but test-getlogin as expected. The problem with cut command remains. What (and where) I’ve made the mistake? Is it safe to continue? Thanks in advance. Kind regards. J.C. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
[lfs-support] coreutis-8.30 multibyte problem
Hello co-listers: I’ve installed LFS 8.4. I’ve built several BLFS packages without problem and X-Window is running (with motif-2.3.8). At the booting of MariadB I’ve detected the following problem: -bash-5.0# echo foobar | LANG=POSIX cut -c4 b -bash-5.0# echo foobar | LANG=en_US.iso8859-1 cut -c4 b -bash-5.0# echo foobar | LAN=en_US.utf8 cut -c4 -bash-5.0# I’m almost sure I’ve properly applied the coreutils-8.30-i18n-1.patch at LFS chapter 6. Just in case, I’ve rebuilt coreutils-8.30 applying patch with a clean environment: -bash-5.0$ env -i TERM="$TERM" HOME=“$HOME" PATH="/bin:/sbin:/usr/bin:/usr/sbin" LC_ALL=POSIX /bin/bash bash-5.0$ I’ve built coreutils (with patch, indeed) as LFS book reads without problem and all tests passed, but test-getlogin as expected. The problem with cut command remains. What (and where) I’ve made the mistake? Is it safe to continue? Thanks in advance. Kind regards. J.C. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] LFS Fail to Boot at End Trace...
On 18/03/2019 23:20, Pei Jia wrote: Hi, all: Thank you for your help so far... I make some progress, please refer to the following pictures... https://longervision.cc/bugs/gparted.jpg https://longervision.cc/bugs/grub.jpg https://longervision.cc/bugs/kernel_panic.jpg I'm pretty sure I've got *2 grubs*, *one on laptop*, *the other on USB stick*. For now, I'm sure I boot from laptop's grub, ti comes to the *Kernel panic - not syncing: No working init found. Try passing init= option to kernel.* *.. * Does that mean, *an initrd.img is a must?* It seems I come to the final stage before make it installable Thanks On 2019-03-18 2:41 p.m., spiky0011 wrote: On 18/03/2019 20:54, Bruce Dubbs wrote: On 3/18/19 3:20 PM, Pei Jia wrote: Hi, Bruce: Thank you for your detailed explanation. 1. 2 grubs * *grub on my host's laptop*, please refer to https://longervision.cc/bugs/grub.jpg . And the contents in */boot/grub/grub.cfg* is too much, I'm *NOT* copy/paste it here. * grub on my USB stick, the contents in /boot/grub/grub.cfg: ➜ grub cat grub.cfg # Begin /boot/grub/grub.cfg set default=0 set timeout=5 set root=(*hd0*,*msdos1*) insmod ext4 menuentry "GNU/Linux, Linux 5.0.2-lfs-8.5" { linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=*/dev/**sde* ro } Obviously, the *grub.cfg* on my *USB stick* is *incorrect*, right? From *grub* *bash*, if I want to load *USB stick's LFS Linux*, I'm quite sure the hard drive is *hd0*, which should *corresponds to sda* instead of *sde*. No matter what, while booting, my laptop pops up https://longervision.cc/bugs/grub.jpg *by default*. So, it seems I'm using *my laptop's grub* right now. I am only guessing, but if the firmware is booting the usb drive, then I would try changing the grub.cfg file on the usb drive to say linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=/dev/sda1 ro From the point of view if the system at this time the only drive is /dev/sda. fstab should reflect the same. grub identifies hard disks differently from the kernel. hd0 is the first drive, but which drive is first? Depends on the firmware, but my guess is the usb drive since it is finding the kernel for booting. The problme is telling the kernel about the system. -- Bruce What is confusing the matter is so many drives, /dev/sd,b,c,d are they usb or internal, can they be removed? if yes that would help. Which grub are you using to boot with? laptop grub or grub on usb, stick. Usb stick grub will be harder to setup at 1st. A good thing to learn would be "booting from grub prompt" this is a very usefull piece of knowledge and helps in situations like this. https://www.linux.com/learn/how-rescue-non-booting-grub-2-linux grub.cfg should look set root=(*hd0,msdos1) insmod ext4 menuentry "GNU/Linux, Linux 5.0.2-lfs-8.5" { linux /boot/vmlinuz-5.0.2-lfs-8.5 rootdelay=10 root=/dev/sde1 rootdelay=10 ro } *"*is vmlinuz-5.0.2-lfs-8.5 in host */boot?* (confirm please) Because set root=(hd0,msdos1) is looking in /dev/sda1/boot for vmlinuz-5.0.2-lfs-8.5. Your grub.cfg from host we only need the lfs part none of the rest is required. looking at your fstab # *_/boot/efi _*was on /dev/sdb1 during installation UUID=Y *_/boot/efi_* vfat umask=0077 0 1 is this a uefi boot system??? If it is there's alot wrong. You havn't said if it' uefi boot or legacy -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
On 19-03-19 10:19, Michael Shell wrote: On Tue, 19 Mar 2019 09:15:25 +0100 thomas wrote: Renaming /tools to another name will be appropriate to come over this issue. Perhaps a more functionally descriptive name would also help in other ways. After all, the stuff in /tools is for a *temporary* LFS system, a first stage of the LFS build process. So, perhaps a dir name such as "lfs_stage1" or "lfs_tmp_toolchain" would not only avoid the Debian namespace collision, but also would be more educational, potentially less confusing to the newbie, and functionally descriptive as well. Just my $0.02, Mike Shell I already use for years now the link name 'lfs'. I build script files and use a common include which contains the current link name. Easy when I change the link name again, I only have to change it in the common include file once. My 0,01 Euro cents ;) Frans. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
On Tue, 19 Mar 2019 09:15:25 +0100 thomas wrote: > Renaming /tools to another name will be appropriate to come over this > issue. Perhaps a more functionally descriptive name would also help in other ways. After all, the stuff in /tools is for a *temporary* LFS system, a first stage of the LFS build process. So, perhaps a dir name such as "lfs_stage1" or "lfs_tmp_toolchain" would not only avoid the Debian namespace collision, but also would be more educational, potentially less confusing to the newbie, and functionally descriptive as well. Just my $0.02, Mike Shell -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
[lfs-support] Potential damage of $LFS/tools setting in section 4.2 and 4.3 of LFS book.
As described in the title, the $LFS/tools setting could be harmful for the current linux distros. Because there already exists /tools folder in current Debian/Ubuntu distros, and it is not possible to correctly set the symlink between the $LFS/tools and /tools. Even if I brutally delete the /tools folder, and set the symlink, the host system will complain that "Too many levels of symbolic links" for simple commands like tar, and all LFS operations following will not be able to execute.I wonder this problem is caused by the dead cycle between the /tools and $LFS/tools. So I suggest totally remove this setting or warn user not to set this variable when some host distros default have /tools in their root folder.Yours sincerely,Lei Niu niuneilneo niuneil...@gmail.com 签名由 网易邮箱大师 定制 -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style