LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-09-2012, 11:01 AM   #31
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled

Sorry for my last post, I wrote udev but I meant devtmpfs, which is said in section 8.3. Thanks for answering my off-topic questions, because I always mount my LFS entry to my host /etc/fstab. On the other hand about the question that I had posted a few months before. I had forgotten to mount my LFS system at the beginning (what a shame! ).

Edit: One thing that came to my mind now, one thing that I didn't do while going through LFS 7.2 book is in section 8.4, using GRUB to set up the boot process. I have dual-booted my laptop with Windows 7 and Linux Ubuntu, and I already have Grub 2.0 on my system. So I thought that because I already have Grub 2.0, I don't need to reinstall it, and that's why in section 8.4, where it says to use "grub-install /dev/sda", I skipped that part, and didn't execute that command, meaning I didn't installed grub. Can it be a problem?

Last edited by erkant; 12-09-2012 at 12:13 PM.
 
Old 12-09-2012, 01:12 PM   #32
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
Hi

As you have added you lfs to ubuntu grub.
Would it be an idea to boot lfs from grub prompt, Any thoughts Druuna sorry to but in.
 
Old 12-09-2012, 01:24 PM   #33
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by erkant View Post
One thing that came to my mind now, one thing that I didn't do while going through LFS 7.2 book is in section 8.4, using GRUB to set up the boot process. I have dual-booted my laptop with Windows 7 and Linux Ubuntu, and I already have Grub 2.0 on my system. So I thought that because I already have Grub 2.0, I don't need to reinstall it, and that's why in section 8.4, where it says to use "grub-install /dev/sda", I skipped that part, and didn't execute that command, meaning I didn't installed grub. Can it be a problem?
It seems that LFS is found and starts booting and that indicates that the grub entry used seems correct. You either choose to use the grub (lilo) that came with your host or use the one in the LFS book.

You've choosen for the one that came with your host so you do not do the grub parts in the LFS book (use your host to add an entry for LFS, which you did).

Just to make sure, can you post the LFS related grub.cfg entry?

Quote:
Originally Posted by spiky0011
As you have added you lfs to ubuntu grub.
Would it be an idea to boot lfs from grub prompt, Any thoughts Druuna sorry to but in.
The LFS kernel is found and starts to boot in the current situation. No need to tinker with grub.

Last edited by druuna; 12-09-2012 at 01:43 PM. Reason: fixed weird sentence
 
Old 12-09-2012, 01:56 PM   #34
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
This is the part regarding LFS in my host machines grub.cfg:

Quote:
menuentry 'LFS' {
set default=0
set timeout=5

insmod ext2

set root='(hd0,msdos6)'
echo 'Loading LFS...'

linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro init=/bin/bash
}
 
Old 12-09-2012, 02:03 PM   #35
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by erkant View Post
This is the part regarding LFS in my host machines grub.cfg:
Code:
menuentry 'LFS' {
 set default=0
 set timeout=5

 insmod ext2

 set root='(hd0,msdos6)'
 echo 'Loading LFS...'

 linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro init=/bin/bash
 }
That is wrong.

Why is the init=/bin/bash part there? It shouldn't be. This explains the lack of errors, the read-only FS and the minimal shell.

Is my assumption correct that you added this entry by hand? If so, let ubuntu do the work with the update-grub command (must be root).
 
Old 12-09-2012, 02:05 PM   #36
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Yes, I added that command by hand. Should I delete it and try booting my LFS, or should I just do update-grub without making any chance to my host grub.cfg, and then try booting my LFS?
 
Old 12-09-2012, 02:17 PM   #37
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by erkant View Post
Yes, I added that command by hand. Should I delete it and try booting my LFS, or should I just do update-grub without making any chance to my host grub.cfg, and then try booting my LFS?
Use the update-grub command. If grub is updated by ubuntu at some point you will probably loose your manual edits.
 
Old 12-09-2012, 02:52 PM   #38
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Thank you very much druuna. I really appreciate it. You saved my day!
After doing update-grub, my host machines grub.cfg changed to:

Quote:
menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2 (on /dev/sda6)" --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root b8748ba1-a41a-4af4-bc55-b501f70b736b
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sda6 ro
}
And guess what, it boots successfully, and asks for lfs login, for the username and password. But the only problem is that I cannot remember my password, while I finished LFS a week or so ago. I checked /etc/passwd of my LFS directory, and there are a lot of entries, but two important users, namely one erkant, with uid 1000, and one lfs with uid 1001. Is there any way how can I check their password, or at least change them, so I can login to my LFS system?

Last edited by erkant; 12-09-2012 at 02:53 PM.
 
Old 12-09-2012, 02:54 PM   #39
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You can (re)set password for a user as root with the following command:
Code:
passwd username
Can you put up the [SOLVED] tag if this is resolved.
- above the first post -> Please Mark this thread as solved if you feel a solution has been provided.
- -or- -
- first post -> Thread Tools -> Mark this thread as solved
 
  


Reply

Tags
filesystem, lfs, mkdir, read only, readonly



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
Read-only file system - ERROR ramecare Linux - Server 5 02-08-2012 11:22 AM
read-only file system error when editing a config file smallfrowne Linux - Newbie 5 02-19-2008 06:06 PM
Read only file system error! xardas Linux - Desktop 1 05-14-2007 10:18 PM
LFS 6.2 a read-only file system? tryLinux&see Linux From Scratch 7 03-13-2007 07:14 PM
read only file system error surfduke Linux - General 3 09-30-2005 07:04 PM

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

All times are GMT -5. The time now is 04:26 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