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 05-18-2021, 01:52 PM   #31
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Original Poster
Rep: Reputation: 2

Quote:
Originally Posted by Bonzoo View Post
Burn an MX USB, Boot it and select grub repair ? Boot repair ? (= Reinstall grub)
better use the live cd i already have, but thanks for suggestion!
 
Old 05-18-2021, 03:14 PM   #32
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by colorpurple21859 View Post
at the grub menu press c for a grub prompt grub>
at the grub prompt
Code:
grub>set
post the following line
Code:
prefix=
In post 9 you say your mounting /dev/sda9 to /boot but according to your grub.cfg /dev/sda2 is the partition where your kernel is located not /dev/sda9

Which partition is suppose to be the / partition?
oh god i am only seeing this now

i actually set the root at hd1,6

here is the actual code:

Code:
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd1,6)

menuentry "GNU/Linux, Linux 5.10.17-lfs-10.1" {
        linux   /vmlinuz-5.10.17-lfs-10.1 root=/dev/sdb6 ro
}
EOF
everywhere i looked, the device name was sda, but for some reason mine is sdb (i have only one hdd). Back then i thought that hd0 = sda and hd1 = sdb, so i wrote hd1. Does this even matter?

also the insmod is set to ext2, but i set up /boot as ext4 in gparted. Again, does it even matter? as you can see i am total noob

Last edited by George528; 05-18-2021 at 03:15 PM.
 
Old 05-18-2021, 03:41 PM   #33
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Quote:
Back then i thought that hd0 = sda and hd1 = sdb, so i wrote hd1. Does this even matter?
Yes, on some systems when a bootable usb is inserted before powering on, the internal drive will become hd1 instead of hd0, or there may be something else in your system for grub to see sda as hd1

Last edited by colorpurple21859; 05-18-2021 at 03:44 PM.
 
Old 05-18-2021, 04:03 PM   #34
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by colorpurple21859 View Post
Yes, on some systems when a bootable usb is inserted before powering on, the internal drive will become hd1 instead of hd0, or there may be something else in your system for grub to see sda as hd1
can you please help me with an off topic question? i booted up from live cd and entered chroot, but for some reason the tools i built in previous chapter doesnt work, for example when i type make mrproper i get this:
Code:
bash: make: command not found
the path already includes :/usr/bin
mounted every device (including props, sys, run, tmpfs)

Last edited by George528; 05-18-2021 at 04:09 PM.
 
Old 05-18-2021, 06:05 PM   #35
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,352

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
If the make command isn't found after chrooting into your system, you have made a mistake somewhere along the way. Most mistakes are made when exiting and/or re-entering chroot when you don't build lfs in one sitting. Running from live cd is even less forgiving as everything is ran/stored in ram on the live filsystem and lost when powering down, if it isn't stored on a mounted partition.

Last edited by colorpurple21859; 05-18-2021 at 06:10 PM.
 
Old 12-30-2023, 06:49 AM   #36
George528
Member
 
Registered: May 2021
Location: Moldova
Distribution: Arch, Debian
Posts: 95

Original Poster
Rep: Reputation: 2
I just reinstalled everything from beginning and it seems I didn't miss anything. Works perfectly!
 
  


Reply

Tags
grub



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
Dualboot [HD1: Ubuntu14.04] / [HD2: Win7(truecrypted) ] DexterMorgan Ubuntu 3 04-30-2015 02:30 PM
fixmbr for WinXP killed GRUB-cannot boot into Ubuntu - HD1+HD2 not recognized Mousy Linux - General 9 08-16-2007 05:39 AM
HD1:IDE Suse 10.2 & Windows Xp Pro HD HD2: SATA XP PRO X64 HOW TO MOUNT HD 2 blazintilda2005 Linux - Hardware 1 04-13-2007 08:30 PM
64-bit Suse9.1 on HD1, need WinXP on HD2 sharkcatcher Linux - Newbie 4 01-22-2005 01:16 PM
red hat on hd1 windows on hd2 FireWolf Linux - Newbie 6 02-12-2003 03:40 AM

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

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