[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with cross install
From: |
Joshua Branson |
Subject: |
Help with cross install |
Date: |
Thu, 11 Jan 2024 23:18:02 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
So I bought myself a T410, because I've heard that Debian GNU/Hurd can
run on it. I thought I would give it a try. The latest Debian GNU/Hurd
netinstall failed. I believe it created the ext2 partitions / and
/home, formatted them as ext2, but left them readable not writable. So
of course the installer could not install the necessary packages.
So Samuel mentioned that I should try crossinstall:
https://www.gnu.org/software/hurd/hurd/running/debian/CrossInstall
For those of you who don't know, if you run Debian GNU/Linux and have a
spare parition, then you can use crossinstall to install Debian GNU/Hurd!
I'm drafting a blog post to talk about how to use it. I'm stuck at
"Preparing to boot" stage as documented in the wiki. I've copied
Damien's grub entry, but it's can't seem to find my hurd-root partition.
Here is my partition scheme for the T410:
|------------+---------+-----------------+------------------|
| #1 primary | 59.4 GB | hurd-root / | /dev/wd0 #1 |
| #2 primary | 60.3 GB | hurd-home /home | /dev/wd0 #2 |
| #3 primary | 5 GB | linux /boot | bootable flag on |
| #4 logical | | | |
| #5 logical | 999.3MB | hurd-swap | |
| #6 logical | 54.3 GB | crypto linux / | |
|------------+---------+-----------------+------------------|
I did use GNU/Linux to run
#+BEGIN_SRC shell
mke2fs -o hurd /dev/sda1
mke2fs -o hurd /dev/sda2
#+END_SRC
So I know that /dev/sda1 and /dev/sda2 are ext2.
Here is my /boot/grub/custom.cfg
#+begin_example
menuentry "pci-arbiter + acpi + rumpdisk" {
set root=(hd0,msdos1)
multiboot /boot/gnumach-1.8-486.gz root=part:1:device:wd0 noide -s
module /hurd/pci-arbiter.static pci-arbiter \
--host-priv-port='${host-port}' \
--device-master-port='${device-port}' \
--next-task='${acpi-task}' \
'$(task-create)' '$(task-resume)'
module /hurd/acpi.static acpi \
--next-task='${disk-task}' \
'$(acpi-task=task-create)'
module /hurd/rumpdisk.static rumpdisk \
--next-task='${fs-task}' \
'$(disk-task=task-create)'
module /hurd/ext2fs.static ext2fs \
--multiboot-command-line='${kernel-command-line}' \
--exec-server-task='${exec-task}' -T typed '${root}' \
'$(fs-task=task-create)'
module /hurd/exec.static exec '$(exec-task=task-create)'
}
#+end_example
I have tried:
#+BEGIN_EXAMPLE shell
root=part:0:device:wd0
root=part:1:device:wd0
root=part:2:device:wd0
root=part:3:device:wd0
#+END_EXAMPLE
But Mach get stuck and can't find part:1. Now GNU Mach does say:
#+BEGIN_example
vendor 8086 product 3b2f (SATA mass storage, AHCI 1.0, revision 0x06) at \
pci0 dev 31 function 2 not configured
... (It shows a lot of devices not configured)
blakefs: self-test passed
chacha: Portable C ChaCha
ex2fs: part:1:device:wd0: No such device or address
#+END_Example
So does that mean it detected my SATA SSD? Also my SATA SSD is ancient.
It has a max capacity of 180GB. So it's a bit odd and old. Maybe
that's why I am having problems? Debian GNU/Linux doesn't mind using
it.
Here are some commands that I ran on Debian GNU/Linux on the T410 to try
to double check my work.
#+BEGIN_SRC shell
joshua@gimli:~$ sudo fdisk -l
[sudo] password for joshua:
Disk /dev/sda: 167.68 GiB, 180045766656 bytes, 351651888 sectors
Disk model: INTEL SSDSC2CW18
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: 0x050ce17c
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 116017672 116015625 55.3G 83 Linux
/dev/sda2 116043776 233846783 117803008 56.2G 83 Linux
/dev/sda3 233846784 243611647 9764864 4.7G 83 Linux
/dev/sda4 243613694 351649791 108036098 51.5G 5 Extended
/dev/sda5 243613696 245565439 1951744 953M 82 Linux swap / Solaris
/dev/sda6 245567488 351649791 106082304 50.6G 83 Linux
Disk /dev/mapper/sda6_crypt: 50.57 GiB, 54297362432 bytes, 106049536 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
joshua@gimli:~$
joshua@gimli:~$
joshua@gimli:~$
joshua@gimli:~$ sudo fsck.ext2 /dev/sda1
e2fsck 1.47.0 (5-Feb-2023)
/dev/sda1: clean, 4080/3629056 files, 201693/14501953 blocks
joshua@gimli:~$
joshua@gimli:~$ sudo fsck.ext2 /dev/sda2
e2fsck 1.47.0 (5-Feb-2023)
/dev/sda2: clean, 11/3686400 files, 129431/14725376 blocks
joshua@gimli:~$
joshua@gimli:~$ mount | grep sda
/dev/mapper/sda6_crypt on / type xfs
(rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
/dev/sda3 on /boot type ext4 (rw,relatime)
joshua@gimli:~$
joshua@gimli:~$
joshua@gimli:~$ sudo mount /dev/sda1 /mnt
joshua@gimli:~$ sudo mount /dev/sda2 /mnt/home
joshua@gimli:~$
joshua@gimli:~$ mount | grep sda
/dev/mapper/sda6_crypt on / type xfs
(rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
/dev/sda3 on /boot type ext4 (rw,relatime)
/dev/sda1 on /mnt type ext2 (rw,relatime)
/dev/sda2 on /mnt/home type ext2 (rw,relatime)
#+END_SRC
Any thoughts?
Thanks,
Joshua
P.S. So the help email ends here, but if you feel like reading/editing my draft
of this blog post for extra credit, then feel free!
BEGIN THE DRAFT BLOG POST:
So, I have been told that Debian GNU/Hurd can run on a T410 with a
SATA SSD. It gets its disk drivers from a
[[https://github.com/rumpkernel][rumpkernel]]. That's pretty
awesome. I downloaded the
[[https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/20230608/iso-cd/][Debian
netinstaller iso image,]] but I could
not get it to completely install. It appeared that the installer
created the ext2 partition, but the partition was readable, not
writable. So of course no packages definitions could be stored on
disk. Odd.
Luckily, I can use Debian GNU/Linux to install Debian GNU/Hurd on a
spare partition via
[[https://www.gnu.org/software/hurd/hurd/running/debian/CrossInstall][CrossInstall]].
That is pretty slick! Well we
might as well try it!
Here is my partition scheme for the T410:
|------------+---------+-----------------+------------------|
| #1 primary | 59.4 GB | hurd-root / | /dev/wd0 #1 |
| #2 primary | 60.3 GB | hurd-home /home | /dev/wd0 #2 |
| #3 primary | 5 GB | linux /boot | bootable flag on |
| #4 logical | | | |
| #5 logical | 999.3MB | hurd-swap | |
| #6 logical | 54.3 GB | crypto linux / | |
|------------+---------+-----------------+------------------|
#+BEGIN_SRC
# mke2fs -o hurd /dev/sda1
# mke2fs -o hurd /dev/sda2
#+END_SRC
Next I needed to install the latest and greatest crossinstall. I added
this to ~/etc/apt/sources.list~
~deb http://ftp.us.debian.org/debian sid main~
#+BEGIN_SRC shell
# apt update
$ apt search crosshurd # let's install the latest version
crosshurd/unstable 1.7.60 all
# apt install crosshurd
#+END_SRC
Now let's mount my two newly re-created Hurd partitions, and run
crosshurd!
#+BEGIN_SRC shell
# mount /dev/sda1 /mnt
# mkdir /mnt/home
# mount /dev/sda2 /mnt/home
$ mount
#+END_SRC
#+RESULTS:
: blah blah blah
: blah blah blah
: /dev/sda1 on /mnt type ext2
: /dev/sda2 on /mnt/home type ext2
Now we can do our crosshurd command!
#+BEGIN_SRC shell
# cd /mnt
# crosshurd
#+END_SRC
The crosshurd command is kind of cool. I answered ~/mnt~, ~gnu~,
~i386~. Apparently you can use crosshurd to install kfreebsd, which
is Debian but using the FreeBSD kernel. That's fairly cool! But the
command failed fairly quickly, because I do not have some gpg keys.
Well let's fix that!
Please note that the below is the proper way to do it. I found an
easier deprecated way to do it, and that's what I did.
#+BEGIN_SRC shell
$ gpg --recv-keys LONGKEYSTRINGNMUBERS
$ gpg --recv-keys LONGKEYSTRINGNMUBERS2
$ gpg -a --export LONGKEYSTRINGNMUBERS >
debian-ports-archive-automatic-signing-key.asc
# mv debian-ports-archive-automatic-signing-key.asc /etc/apt/trusted.gpg.d/
# crosshurd
#+END_SRC
What I actually did:
#+BEGIN_SRC shell
$ gpg --recv-keys LONGKEYSTRINGNMUBERS
$ gpg --recv-keys LONGKEYSTRINGNMUBERS2
$ gpg -a --export LONGKEYSTRINGNMUBERS | sudo apt-key add -
# crosshurd
#+END_SRC
It looked like everything was installed, then it said, copying this
machine's resolve.conf to the new partition. If not correct, then
please edit. Hopefully it is!
So now I need to add a boot entry to =/etc/grub.d/custom.cfg=.
Apparently whatever you add in that file, will automatically appear in
Grub on the next boot! Note that I have to add the ~-s~ to the kernel
args. After I run ./native-install twice, I can remove it.
#+begin_example
menuentry "pci-arbiter + acpi + rumpdisk" {
set root=(hd0,msdos1)
multiboot /boot/gnumach-1.8-486.gz root=part:1:device:wd0 noide -s
module /hurd/pci-arbiter.static pci-arbiter \
--host-priv-port='${host-port}' \
--device-master-port='${device-port}' \
--next-task='${acpi-task}' \
'$(task-create)' '$(task-resume)'
module /hurd/acpi.static acpi \
--next-task='${disk-task}' \
'$(acpi-task=task-create)'
module /hurd/rumpdisk.static rumpdisk \
--next-task='${fs-task}' \
'$(disk-task=task-create)'
module /hurd/ext2fs.static ext2fs \
--multiboot-command-line='${kernel-command-line}' \
--exec-server-task='${exec-task}' -T typed '${root}' \
'$(fs-task=task-create)'
module /hurd/exec.static exec '$(exec-task=task-create)'
}
#+end_example
--
Joshua Branson
Sent from the Hurd
- Help with cross install,
Joshua Branson <=