LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-14-2012, 03:15 AM   #16
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by spiky0011 View Post
Hi

Can you get a grub prompt, If so try loading manually
I can enter the grub prompt and I can see that it recognizes the usb as (hd1,gpt1) (?)
and when I try root(hd1,gpt1) it gives me error: unknown command root(hd1,gpt1)
 
Old 10-14-2012, 03:22 AM   #17
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
The gpt I have not seen normally it would be msdos1 etc root=(hd1,msdos1)
All mine show like this, Although they are usb harddrives but I dont think there should be a difference
 
Old 10-14-2012, 03:29 AM   #18
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I am up to
Code:
linux /boot/vmlinuz root=/
and the possibilities it gives are: bin/ lib/ dev/, but not dev/sd...
 
Old 10-14-2012, 03:30 AM   #19
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by spiky0011 View Post
The gpt I have not seen normally it would be msdos1 etc root=(hd1,msdos1)
All mine show like this, Although they are usb harddrives but I dont think there should be a difference
I think that's because I created the partition with GParted.
 
Old 10-14-2012, 03:34 AM   #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
No i used gparted as well. So at grub prompt if you type ls it returns
hd0,xxx
 
Old 10-14-2012, 03:36 AM   #21
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I've got ..., (hd0,msdos2), (hd0,msdos1) ... (hd1,gpt1)
 
Old 10-14-2012, 03:47 AM   #22
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

I found this https://wiki.archlinux.org/index.php...c_instructions
Not sure how you get round it though

Last edited by spiky0011; 10-14-2012 at 03:49 AM.
 
Old 10-14-2012, 04:01 AM   #23
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
It dosn't look easy to convert drive to mbr from gpt.
http://www.rodsbooks.com/gdisk/mbr2gpt.html
Here might help
http://www.ehow.com/how_12119053_con...mbr-linux.html

Last edited by spiky0011; 10-14-2012 at 04:03 AM.
 
Old 10-14-2012, 04:59 AM   #24
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I changed the partition table and now I have a normal ext3 partition in my usb stick.
the strange things now is that when I install grub with grub-install /dev/sdb1 it says Installation finished. No errors reported, but the grub folder in /mnt/lfs/boot/ is empty?!
 
Old 10-14-2012, 05:05 AM   #25
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
Should it be /dev/sdb not /dev/sdb1
 
Old 10-14-2012, 08:18 AM   #26
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
On first boot with grub2 installed to usb key, grub2 will see the usb key as the first hard drive, however the linux kernel that is being booted will see the internal hard drive as the first hard drive. If I'm not mistaken it will switch around on a reboot and the usb grub2 will see the internal hard drive as the first hard drive. On first boot this should work
Code:
set root(hd1,msdos1)
linux /boot/vmlinuz root=/dev/sda1
on reboots
Code:
set root(hd0,msdos1)
linux /boot/vmlinuz root=/dev/sda1
I believe the use of uuids will solve the problem

Last edited by colorpurple21859; 10-14-2012 at 08:27 AM.
 
Old 10-15-2012, 02:52 AM   #27
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I created a partition in my HDD (/dev/sda3) and trying to boot the system from there. In the grub shell I write
Code:
set default=0 
set timeout=5
insmod ext2 
set root=(hd0, msdos3)
linux	/boot/vmlinuz root=/dev ro
boot
It start decompressing the kernel and it stops after a while with a Kernel panic fatal exception!
 
Old 10-15-2012, 03:45 AM   #28
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
Why have you got a partition on hdd for i thought you was using usb
 
Old 10-15-2012, 05:45 AM   #29
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
I switched to HDD for now to complete the process and start the distribution. As you know, I was having problems with gpt partition and I didn't have time to solve the problems.
Now I'm able to get the bash shell after booting the system. But for know I'm using the image of a kernel I had in my host Ubuntu. With the image I prepared from scratch, I'm having problems (kernel panic). It seems that even if I configured it with make allyesconfig the necessary support for the hardware is still missing.
 
Old 10-15-2012, 06:00 AM   #30
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
Why not build the kernel as per book
 
  


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
How to boot from an USB stick without BIOS support using Grub2? vimico Linux - Laptop and Netbook 11 02-25-2012 05:19 PM
Booting a USB stick with GRUB2 and Labels ljones0 Slackware 1 02-14-2011 07:53 PM
[SOLVED] Create independent Grub2 boot loader menu in USB stick. cr4321 Linux - General 27 07-18-2010 12:48 PM
Grub2 (1.96) loopback problem on usb-stick ganimo Linux - General 4 10-01-2009 07:26 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM

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

All times are GMT -5. The time now is 12:09 PM.

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