You are not logged in.

#1 2017-07-22 11:56 am

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,422
Website

[OFF-TOPIC] Install of Devuan on UEFI Computer

Be warned that this is very painful - not advised for the nervous or noobs (Debian uefi install was easy; Devuan uefi is not)

  1. Obtain CD/DVD iso:-
    https://files.devuan.org/devuan_jessie/desktop-live/

  2. Burn to USB-stick (~2GB min; I used 32GB):
    a) Plug in the stick & check-out it's device name using one or more of:

    $ lsblk
    $ df -hT
    $ sudo fdisk -l

    b) Get the 'of' device name wrong in the step below & shaft your computer without warning:

    $ sudo dd if=./Downloads/devuan_jessie_1.0.0_amd64_uefi_desktop-live.iso of=/dev/sdc bs=4M; sync

    c) reboot to Devuan-Live desktop
    (user/password = devuan/devuan; root/password = root/toor)

  3. Setup Devuan-Live the way that you would want it to be (use Synaptic to update fully, include locale, keyboard, whatever setup). The running system is used to install to your HDD.

  4. Use Desktop link to install from USB to HDD
    (swimmingly simple until you get to UEFI)

  5. Locate & put the uefi helpfile in a separate window, as otherwise you will loose it at the vital moment when it switches to the HDD UEFI setup (see next post):
    /usr/lib/refractainstaller/uefi_install.readme

  6. Rebooting the hdd after setup drops me into grub rescue. It says:

    file '/boot/grub/x86_64-efi/normal.mod' not found

    (not helpful - this is the equivalent of finding oneself on a river in a barbed-wire canoe surrounded by sharks & without a paddle. Well done, Devuan)

Working now after rebooting into Devuan-Live I fixed that as follows (some of what follows may be wrong; the point is that, in the end, it worked):

  1. Mounted the HDD partitions within Live using UUIDs; I've no idea whether those were essential; first was to discover the UUIDs from a root terminal:

    # blkid
    /dev/sda1: UUID="4CD1-6816" TYPE="vfat" PARTUUID="75179c70-b3b4-4c5e-9684-21cf493e8438"
    /dev/sda2: UUID="689f9e16-2d78-4635-b9c1-d68a8994e668" TYPE="ext4" PARTUUID="924dc2aa-fbd2-4747-b356-3cf070a966df"
    /dev/sdc1: LABEL="Live-Devuan" UUID="0EB0-C617" TYPE="vfat" PARTUUID="971651f3-01"
    /dev/sda3: UUID="f10d59d3-426b-499e-afa1-8715920318c3" TYPE="swap" PARTUUID="54a5a38e-ae7f-41e7-8c88-f0014e7cefe0"
    /dev/sdc2: LABEL="persistence" UUID="0EF5-4120" TYPE="vfat" PARTUUID="971651f3-02"
    /dev/loop0: TYPE="squashfs"
  2. Then mount the hdd + boot (the latter mounted inside the first):-

    # mount -t ext4 -U689f9e16-2d78-4635-b9c1-d68a8994e668 /mnt
    # mount -t vfat -U4CD1-6816 /mnt/boot/efi
    # df -Th
    Filesystem     Type      Size  Used Avail Use% Mounted on
    ...
    /dev/sda2      ext4      909G  2.8G  907G   1% /mnt
    /dev/sda1      vfat      511M  132K  511M   1% /mnt/boot/efi
  3. Mount critical virtual filesystems:-

    for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
  4. change to chroot:-

    # chroot /mnt /bin/bash
  5. Resetup UEFI

    # apt-get install grub-efi --reinstall
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      grub-efi
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    Need to get 2596 B of archives.
    After this operation, 4096 B of additional disk space will be used.
    Get:1 http://auto.mirror.devuan.org/merged/ jessie/main grub-efi amd64 2.02~beta2-22+deb8u1 [2596 B]
    Fetched 2596 B in 0s (2597 B/s)     
    Selecting previously unselected package grub-efi.
    (Reading database ... 93451 files and directories currently installed.)
    Preparing to unpack .../grub-efi_2.02~beta2-22+deb8u1_amd64.deb ...
    Unpacking grub-efi (2.02~beta2-22+deb8u1) ...
    Setting up grub-efi-amd64 (2.02~beta2-22+deb8u1) ...
    Generating grub configuration file ...
    Found theme: /usr/share/desktop-base/grub-themes/desktop-grub-theme/theme.txt
    Found linux image: /boot/vmlinuz-3.16.0-4-amd64
    Found initrd image: /boot/initrd.img-3.16.0-4-amd64
    Found memtest86+ image: /boot/memtest86+.bin
    Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
    done
    Setting up grub-efi (2.02~beta2-22+deb8u1) ...
  6. Get out from chroot ("exit"), then unmount:-

    for i in /dev /dev/pts /proc /sys /run; do sudo umount $i /mnt$i; done
  7. (the above was me completing steps not properly done during original setup)
    (I restarted but got the same error as before)
    (next steps are fixing that error)

  8. .mod files for grub-rescue exist at /mnt/usr/lib/grub/x86_64-efi.
    Internet research showed that the problem was fixed by copying /boot files from the HDD to the EFI partition.

    So, from a root terminal:

    # mkdir hdd
    # mount -t ext4 -U689f9e16-2d78-4635-b9c1-d68a8994e668 /mnt
    # mount -t vfat -U4CD1-6816 /hdd
    # ln -t /mnt/boot/grub/x86_64-efi /mnt/usr/lib/grub/x86_64-efi/*
    # cp -R /mnt/boot /hdd/

On reboot everything now works, and I'm posting this the next afternoon from my Devuan desktop. A bloody pain, but so satisfying to finally have shafted systemd & get access back to /var/log, etc..

Offline

#2 2017-07-23 9:45 am

pedigree
uıɐbɐ ʎɐqǝ ɯoɹɟ pɹɐoqʎǝʞ ɐ buıʎnq ɹǝʌǝu ɯ,ı
From: New Zealand
Registered: 2008-04-16
Posts: 7,056

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

systemd, god it annoys me.  I've deliberately stuck with Ubuntu 14.04 because of this.

Offline

#3 2017-07-23 11:03 am

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,422
Website

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

refractainstaller + refractasnapshot are part of the standard Devuan install, so here is /usr/lib/refractainstaller/uefi_install.readme from my hdd:

UEFI INSTALL INSTRUCTIONS (EXPERIMENTAL) v.9.2.2

    for refractainstaller-uefi

  1. The easy way:

    If you already have a linux installation on the computer that boots uefi, and you plan to keep that linux, you can use this installer, but when you get to the part that says you're ready to chroot, just select OK, and you'll bypass that step.

    If you accidentally choose Chroot, you can still skip this step by simply exiting the terminal window that pops up.

    When the install is complete, reboot into your first linux and run update-grub, or do whatever you do to add a boot menu entry for the new installation.

  2. The experimental, semi-manual uefi installation:

    Don't mess with this if you don't know what you are doing! These instructions are probably not complete and can't account for all the non-standard variations in uefi implementation used in motherboards. And this installer has had minimal testing. (It works great on my linux-only Toshiba notebook.) Be prepared to hose your system.

        Read this:
        http://www.rodsbooks.com/efi-bootloaders/index.html

    This iso will boot bios or uefi. To install on uefi hardware, run

    refractainstaller-uefi -d

    There is only Expert Install.
    Leave the box checked for "Do not install bootloader"
       
    Create efi partition if one does not already exist. It should be the first partition on the first hard drive. In gparted, make a fat32 partition, around 200-300MB (or bigger if that causes problems) and set the esr flag. (The boot flag is added automatically.)

    When the script pauses, the installed system is ready for you to install the bootloader. There are several choices:

    1. Chroot:
      Opens a terminal in the chrooted installation.
      If you have the grub-efi packages, run:

      dpkg -i grub-efi*.deb
      update-grub
      exit

      If grub-efi is already installed, you can run:

      grub-install  (optionally add --bootloader-id=some-name)
      update-grub
      exit
    2. Install bootloader:
      This button will appear if grub-efi is installed. Selecting this will run grub-install and update-grub for you. There's no way to select a bootloader-id this way. It will be called 'devuan' (or another distro.)

    3. Copy files:
      This button will appear if grub-efi is not installed and the grub-efi deb packages are not found in the target root directory. If you have the packages somewhere else, this will let you select them and will copy them to the target for you. You can then install them with dpkg as described above in the chroot terminal.

    4. Continue:
      Will proceed whether or not you have installed a bootloader. If not, you will need to have another way to boot this installation.

      NOTE: This is the default if you just press ENTER.

    5. Abort: will exit the installer and abort the installation.

  3. Fully manual method (deprecated):
    These steps now get done for you if you press the Chroot button.
    **   
    **    Add an entry to /target/etc/fstab for the efi partition (probably /dev/sda1)
    **        /dev/sda1    /boot/efi    vfat    defaults    0    1
       
    **        mkdir /target/boot/efi
    **        mount $efi_part /boot/efi   
    **        chroot /target

    In the chroot terminal, run these commands
    -->
    -->        dpkg -i /grub-efi*.deb    # Install both packages!

    edit /etc/default/grub if desired.

    -->        update-grub
    -->        exit

    Then close the pause window and finish the installation.

Note: Doing "dpkg -i /grub-efi.deb" also auto-performs "update-grub" following the installation.

Offline

#4 2017-07-23 11:18 am

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,422
Website

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

Here is a diagnostic for the EFI partition:

# efibootmgr -v
BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0008,0001,0006,0007,0004,0005
Boot0001* debian	HD(1,800,100000,75179c70-b3b4-4c5e-9684-21cf493e8438)File(\EFI\debian\grubx64.efi)
Boot0004* Generic Usb Device	Vendor(99e275e7-75a0-4b37-a2e6-c5385e6c00cb,)
Boot0005* CD/DVD Device	Vendor(99e275e7-75a0-4b37-a2e6-c5385e6c00cb,)
Boot0006* UEFI: IP4 Realtek PCIe FE Family Controller	ACPI(a0341d0,0)PCI(2,5)PCI(0,0)MAC(MAC(d8cb8ade0bd0,0)..BO
Boot0007* UEFI: IP6 Realtek PCIe FE Family Controller	ACPI(a0341d0,0)PCI(2,5)PCI(0,0)MAC(MAC(d8cb8ade0bd0,0)030d3c000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000..BO
Boot0008* UEFI: ADATA USB Flash Drive 1100	ACPI(a0341d0,0)PCI(12,0)USB(1,0)USB(2,0)HD(1,800,4f9000,971651f3)..BO

It has some scary options:-

# efibootmgr --help
efibootmgr version 0.11.0
usage: efibootmgr [options]
	-a | --active         sets bootnum active
	-A | --inactive       sets bootnum inactive
	-b | --bootnum XXXX   modify BootXXXX (hex)
	-B | --delete-bootnum delete bootnum (hex)
	-c | --create         create new variable bootnum and add to bootorder
	-D | --remove-dups	remove duplicate values from BootOrder
	-d | --disk disk       (defaults to /dev/sda) containing loader
	-e | --edd [1|3|-1]   force EDD 1.0 or 3.0 creation variables, or guess
	-E | --device num      EDD 1.0 device number (defaults to 0x80)
	-g | --gpt            force disk with invalid PMBR to be treated as GPT
	-H | --acpi_hid XXXX  set the ACPI HID (used with -i)
	-i | --iface name     create a netboot entry for the named interface
	-l | --loader name     (defaults to \EFI\redhat\grub.efi)
	-L | --label label     Boot manager display label (defaults to "Linux")
	-n | --bootnext XXXX   set BootNext to XXXX (hex)
	-N | --delete-bootnext delete BootNext
	-o | --bootorder XXXX,YYYY,ZZZZ,...     explicitly set BootOrder (hex)
	-O | --delete-bootorder delete BootOrder
	-p | --part part        (defaults to 1) containing loader
	-q | --quiet            be quiet
	-t | --timeout seconds  set boot manager timeout waiting for user input.
	-T | --delete-timeout   delete Timeout.
	-u | --unicode | --UCS-2  pass extra args as UCS-2 (default is ASCII)
	-U | --acpi_uid XXXX    set the ACPI UID (used with -i)
	-v | --verbose          print additional information
	-V | --version          return version and exit
	-w | --write-signature  write unique sig to MBR if needed
	-@ | --append-binary-args file  append extra args from file (use "-" for stdin)
	-h | --help             show help/usage

Offline

#5 2017-07-24 8:13 am

pedigree
uıɐbɐ ʎɐqǝ ɯoɹɟ pɹɐoqʎǝʞ ɐ buıʎnq ɹǝʌǝu ɯ,ı
From: New Zealand
Registered: 2008-04-16
Posts: 7,056

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

For all the effort that they spent in gutting systemd from debian 9, there seems to be some effort missing from the efi boot systems

Offline

#6 2017-07-24 3:53 pm

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,422
Website

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

I've found the first "systemd is better than sysinit" moment:

I used to have my Dell desktop computer plugged into a box that shut off all local electric systems when I powered off the hdd. My replacement Lenovo is powered by a step-down transformer & the previous system does not work, so I use the desktop lamp instead. Unfortunately that usually means that the hdd is left powered on whilst everything else is powered off (including Virgin broadband). The consequence of that is that sometimes the network is unreachable even after the hub has rebooted itself 3 times in the course of making a connection. It was reasonably simple to re-establish connections:-

sudo /etc/init.d/network-manager restart

Today I discovered that that was a systemd command. The sysinit replacement is

/etc/init.d/networking restart

...which gave a warning, or

/etc/init.d/networking stop
/etc/init.d/networking start

...both of which gave 'OK' responses, but lied, as there was still a "I don't know who they are, pet" (my system has a Geordie locale) to a 'ping google'.

In the end I had to click the System Notification in the panel for Wicd Network Manager; that worked.

Offline

#7 2017-07-24 11:54 pm

Papa Parrot
Member
From: Mexico
Registered: 2011-08-19
Posts: 1,826
Website

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

Glad to see you are getting it working though,...

pedigree
    Yesterday 4:45 am

systemd, god it annoys me.  I've deliberately stuck with Ubuntu 14.04 because of this.

Interesting side note, I do not see any full quote option any more ...In this case it is a short quote  any way,
and further back in the thread,...
   I had been sticking with Debian 7.0, and still am on one server,  I tried Devuan in it's early stages, did not get
very far, all they had was a netinstall iso, and I can not use those, or don't like to.... seems my "broadband" does not work that easy, and needs to be configured after the OS is installed, with a netinstall, one needs to be able to connect to internet and the installer could not find my broadband device.
  Using OpenBsd now, the changes Linux in general is making,...but suppose that is another topic.
Any way glad to see Alex got his Devuan working,...  Did you ever take a look at the forum I mentioned in
the other topic, ? ...
It appears they are using SFS,.. I am surprised nobody else has jumped in here .

from: https://dev1galaxy.org/viewtopic.php?pid=517#p517
We've been using SFS since we went online.  The spam domains are well-known to us and we can delete them with confidence.  But it is CONSTANT manual labor and some are getting through before we can get to them.  This approach is not sustainable.  We have not yet found a way to automate deleting those registrations against the SFS database.

The question asked here is whether forum members have any thoughts about or objections to requiring activation of new accounts via admin intervention.

Guess that is all from me for now.

Offline

#8 2017-07-25 5:09 pm

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,422
Website

Re: [OFF-TOPIC] Install of Devuan on UEFI Computer

GarryRicketson wrote:

Did you ever take a look at the forum I mentioned in
the other topic, ? ...
It appears they are using SFS,.. I am surprised nobody else has jumped in here

I had a very fast look at it, Garry. My time is constrained atm, particularly just now as my grandkids are visiting in a couple of days & the house needs a deep clean (too much time on the computer).

Offline

Board footer

Powered by FluxBB

Close
Close