> From: thibaut noah <[email protected]>
> Date: Wed, 29 Jun 2016 11:16:11 +0200
> Subject: Re: [lfs-support] Grub failed me, my boot has sink
>
>
> 2016-06-29 9:39 GMT+02:00 akhiezer <[email protected]>:
>
> For example, if:
> > --
> > * you have two separate physical disks;
> >
> > * and your debian (without any ~unusual remappings/&c) sees them as sda
> > (for disk1) & sdb (for disk2);
> >
> > * and you don't change the physical connections of the disks to the
> > computer;
> >
> > * then your lfs should see the same sda (for disk1) & sdb (for disk2)
> > - again, without any ~unusual remappings/&c.
> > --
> >
> They are both virtual disks and i am trying to run sdb alone (by creating
> another virtual machine with just sdb as a virtual disk).
>
From this and what you say in other parts of the thread:
==
* you have got only one _physical_ disk; is that correct?
* you want to boot directly from power-on thru bios/uefi, directly into
lfs; is that correct?
==
Assuming 'yes' to both questions, then very likely:
--
* said bios/uefi will see the single disk as sda .
* said grub will need to know what are the _real_ partitions on sda that
'/' and '/boot' are on.
--
From your _Debian_ host, do - and don't worry about errors:
==
LG_FP="$(mktemp /tmp/lfsinfos.XXXXXX)";
{
for i in a b ; do
DSK_DEV=/dev/sd$i ;
for j in 'hdparm -i' 'fdisk -l' 'gdisk -l' ; do
cmd="$j \"${DSK_DEV}\"" ;
echo -e ":------------\n:$ ${cmd}" ;
eval $cmd 2>&1 ;
echo -e ":$" ;
done;
done;
} >"${LG_FP}" 2>&1 ;
echo "(logfile) = (${LG_FP})";
==
; & paste logfile here.
> >
.
.
>
> Please note that my fstab and my grub file have been made with the
> assumption that by having one disk only sdb would become sda on the new
> virtual machine.
>
> fstab :
> 1. /dev/sda1 / ext4 defaults 1 1
> 2. /dev/sda2 swap swap pri=1 0 0
> 3. /dev/sda3 /boot ext2 defaults 1 1
> 4. proc /proc proc nosuid,noexec,nodev 0 0
> 5. sysfs /sys sysfs nosuid,noexec,nodev 0 0
> 6. devpts /dev/pts devpts gid=5,mode=620 0 0
> 7. tmpfs /run tmpfs defaults 0 0
> 8. devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
>
> grub.cfg :
> 1. # Begin /boot/grub/grub.cfg
> 2. set default=0
> 3. set timeout=5
> 4.
> 5. insmod ext2
> 6. set root=(hd0,3)
> 7.
> 8. menuentry "GNU/Linux, Linux 4.4.2-noah" {
> 9. linux /vmlinuz-4.4.2-tnoah root=/dev/sda1 ro
> 10. }
>
> fdisk -l :
Was this fdisk-l generated from your Debian host or from your lfs?
> - Disk /dev/sda: 8 GiB, 8589934592 bytes, 16777216 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: 0x5c2e89f5
> -
> - Device Boot Start End Sectors Size Id Type
> - /dev/sda1 * 2048 15988735 15986688 7.6G 83 Linux
> - /dev/sda2 15990782 16775167 784386 383M 5 Extended
> - /dev/sda5 15990784 16775167 784384 383M 82 Linux swap / Solaris
> -
Is sda1 there your 7.6 GB Debian host?
> - Disk /dev/sdb: 15 GiB, 16106127360 bytes, 31457280 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: gpt
> - Disk identifier: F700B567-368F-4096-BB5B-6B2A5C670F10
> -
> - Device Start End Sectors Size Type
> - /dev/sdb1 2048 20973567 20971520 10G Linux filesystem
> - /dev/sdb2 20973568 29362175 8388608 4G Linux filesystem
> - /dev/sdb3 29362176 31457246 2095071 1023M BIOS boot
>
And is the sdb1 there your 10 GB lfs '/' ; and the sdb2 your (4 GB)
lfs swap; and the sdb3 your 1 GB lfs /boot ?
In any case: where on the single _physical_ disk, do those sdb{1,2,3}
partitions live? You need to be able to say/know, effectively: 'sdb1'
is 'really' 'sdaN', for some number 'N'; and similarly for 'sdb2' &
'sdb3' .
Hope that makes sense and am not confusing things (further).
hth,
akh
--
--
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