LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-30-2014, 01:32 PM   #16
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412

To be on the safe side not knowing where it went wrong I would start again.
If you want to make an entry in fstab thats ok just remove it after build.

Always check LFS is set "echo $LFS" even as root user and lfs user.

When you get to Chapter 6 if you reboot do check sda? mounted and DO 6.2.2 and 6.4
Think that covers it, unless Teufel as any other advice
 
Old 11-30-2014, 01:36 PM   #17
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by sholizar View Post
well, there is not a boot dir there(in /dev/sda5) :-)
i made a directory /mnt/pashosh
then i mount /dev/sda5 /mnt/pashosh
then i go into /mnt/pashosh and there are there just those folders:

lost+found sources tools

all my work is in /mnt/lfs directory, but /mnt/lfs isn't connected to /dev/sda5.
if /mnt/lfs directory has no any partition attached (not mentioned in "mount" command output) but still has your system LFS installed there it seems you installed your system not at sda5, but at /mnt/lfs that belongs another filesystem.
However it dosn't explain why grub found your kernel at sda5.

Did you try to find lfs kernel location from grub shell?
 
Old 11-30-2014, 01:45 PM   #18
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
if /mnt/lfs directory has no any partition attached (not mentioned in "mount" command output) but still has your system LFS installed there it seems you installed your system not at sda5, but at /mnt/lfs that belongs another filesystem.
yes, you are right!

Quote:
However it dosn't explain why grub found your kernel at sda5.
maybe it didn't found.
i just have a new entry in the grub menu.
maybe it just that: menu entry, and nothing else :-)

Quote:
Did you try to find lfs kernel location from grub shell?
i tried before to search in grub command line, like that:
search -f /boot/vmlinuz-3.13.3-lfs-7.5

it didn't find anything because this file(as i know now) is in /mnt/lfs/boot
and as you(and me) understand now, it's just a folder in my archlinux system :-)
 
Old 11-30-2014, 01:49 PM   #19
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
[QUOTE=spiky0011;5277160]
Quote:
If you want to make an entry in fstab thats ok just remove it after build.
remove it after i finished everything and i'm just before the restart to my new LFS system?


Quote:
Always check LFS is set "echo $LFS" even as root user and lfs user.
i did it.
even now echo $LFS give me /mnt/lfs, if i change to user lfs :-)
 
Old 11-30-2014, 01:53 PM   #20
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
yea remove from fstab when lfs boots, that shows that lfs is set "dosn't hurt to check"
as Teufel mentioned what is in /mnt/lfs without sda5 mounted?
 
Old 11-30-2014, 02:00 PM   #21
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by sholizar View Post
it didn't find anything because this file(as i know now) is in /mnt/lfs/boot
and as you(and me) understand now, it's just a folder in my archlinux system :-)
Obviously you forgot to mount sda5 before starting installation.
Seems you have to re-install it.
Though things might be moved from /mnt/lfs to sda5, but I think it would be very tricky to get it configured properly.
 
Old 11-30-2014, 02:07 PM   #22
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Though, I would try to boot into LFS by editing grub menu entry to get it pointed to root as
root=<arch partition>/mnt/lfs/boot/vmlinuz.......
Just out of curiosity

Last edited by Teufel; 11-30-2014 at 02:28 PM.
 
Old 11-30-2014, 04:18 PM   #23
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Teufel View Post
Though, I would try to boot into LFS by editing grub menu entry to get it pointed to root as
root=<arch partition>/mnt/lfs/boot/vmlinuz.......
Just out of curiosity
i tried but i get the same error which is strange because i know for sure that my /mnt/lfs is on sda3.
i did it like that:
linux /mnt/lfs/boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda3 ro
 
Old 11-30-2014, 04:37 PM   #24
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Another final option if the files are there, A long shot mount sda5 cp -r all the directories to sda5 If that fails clean up and start again
 
Old 11-30-2014, 06:22 PM   #25
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Another final option if the files are there, A long shot mount sda5 cp -r all the directories to sda5 If that fails clean up and start again
you are the man, my friend!
it is working.
i can boot into LFS!!!
it's ugly like hell is, but i'm very (very!) happy!
thank you very much!

i mount /dev/sda5 to /mnt/pashosh
then i: cp -rf /mnt/lfs/* /mnt/pashosh

waiting... ...

after finished i: umount /mnt/pashosh

and then: mount -v -t ext4 /dev/sda5 /mnt/lfs

i remove the entry i made manually before, from the file '/etc/grub.d/40_custom' (don't need it, because grub-mkconfig will do the trick).
save this file
now when i do: grub-mkconfig -o /boot/grub/grub.cfg

it also find! my LFS!!! (besides the other already recognized OSes (arch and windows)).

reboot

now, when i press the LFS menu i get into the system.

great great greeat!
again, thank you very much!
 
Old 11-30-2014, 06:32 PM   #26
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Can you post your fstab for both systems &
Quote:
fdisk -l
 
Old 11-30-2014, 06:42 PM   #27
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Isn't sda5 seen as hd0,4?
 
Old 11-30-2014, 07:07 PM   #28
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by EDDY1 View Post
Can you post your fstab for both systems &
here fdisk -l:
Code:
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xce198556

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sda1             2048  163842047  163840000  78.1G  7 HPFS/NTFS/exFAT
/dev/sda2        163842048 1869158399 1705316352 813.2G  7 HPFS/NTFS/exFAT
/dev/sda3       1869158400 1911511039   42352640  20.2G 83 Linux
/dev/sda4       1911511040 1953523711   42012672    20G  5 Extended
/dev/sda5       1911513088 1944281087   32768000  15.6G 83 Linux
/dev/sda6       1944283136 1953523711    9240576   4.4G 82 Linux swap / Solaris

sda1 is windows 7
sda2 is another ntfs partition.
sda3 is where my archlinux exist.
sda5 is my LFS :-)

my /etc/fstab in archlinux is:
Code:
# <file system>	<dir>	<type>	<options>	<dump>	<pass>

  /dev/sda3     /         	ext4      	rw,relatime,data=ordered	0 1
  /dev/sda2	/mnt/openwrt    ntfs-3g         defaults,windows_names          0 0
  /dev/sda6     none            swap            defaults                        0 0
ignore the 'openwrt' (i need to change it to something else, more normal :-))

and in LFS:

Code:
# file system  mount-point  type     options             dump  fsck
#                                                              order

/dev/sda5     /            ext4    defaults            1     1
/dev/sda6     swap         swap     pri=1               0     0
proc           /proc        proc     nosuid,noexec,nodev 0     0
sysfs          /sys         sysfs    nosuid,noexec,nodev 0     0
devpts         /dev/pts     devpts   gid=5,mode=620      0     0
tmpfs          /run         tmpfs    defaults            0     0
devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0

Last edited by sholizar; 11-30-2014 at 07:12 PM.
 
Old 11-30-2014, 07:26 PM   #29
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Can you post solution so others can benefit?
 
Old 12-01-2014, 02:50 AM   #30
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by EDDY1 View Post
Can you post solution so others can benefit?
here it is:
http://www.linuxquestions.org/questi...ml#post5277299
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gcc 4.6.1 can't Find in /mnt/lfs/tools on LFS verison 7.0 using LFS_TGT xerofoify Linux From Scratch 20 08-03-2012 12:55 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6 Lyle Linux From Scratch 14 05-15-2010 03:22 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration