Dienstag, 12. Juni 2018

Slackware 14.2 with Hyper-V

After installing the system to the virtual machine one have to create an initrd with hv-modules included and add it to lilo.cfg.

mkinitrd -c -r /dev/sdx -m hv_vmbus:hv_storvsc:mbcache -u -o /boot/initrd.gz

add: initrd = /boot/initrd.gz to lilo.cfg and run lilo

thats it.

Mittwoch, 28. März 2018

Dienstag, 21. November 2017

Joy Division - Ceremony (I love this song)

Joy Division - CEREMONY

This is why events unnerve me,
They find it all, a different story,
Notice whom for wheels are turning,
Turn again and turn towards this time,
All she ask's the strength to hold me,
Then again the same old story,
Word will travel, oh so quickly,
Travel first and lean towards this time.
Oh, I'll break them down, no mercy shown,
Heaven knows, it's got to be this time,

Watching her, these things she said,
The times she cried,
Too frail to wake this time.
Oh, I'll break them down, no mercy shown,
Heaven knows, it's got to be this time,
Avenues all lined with trees,
Picture me and then you start watching,
Watching forever, forever,
Watching love grow, forever,
Letting me know, forever.

Freitag, 13. Oktober 2017

Installing Slackware on GPD Pocket

I tried installing Slackware on my GPD Pocket. I wasn't able to boot some of the regular install-iso's or live-cd. (they all stuck after the grubmenu)
So I finally tried the usbboot.img from usb-and-pxe-installers - section.

...and it booted without any problems. I connected the usbstick via a usb-hub with a usb-ethernet-adapter on another port of the hub. (be sure to connect power-supply to your pocket, if you use a passiv-hub).

I booted the usbboot.img and did a normal network-install with a current-mirror to get an actual kernel installed.

At the end of the installation I installed elilo, rebooted and the pocket won't boot into the new system.

So I took an ubuntu-live-system from https://apt.nexus511.net/index.html (great thanks to that guy!). I chrooted into the Slackware-System:

mount /dev/mmcblk0p2 /mnt
mount /dev/mmcblk0p1 /mnt/boot/efi

mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc

cp /etc/resolv.conf /mnt/etc/

chroot /mnt /bin/bash

Instead of tinkering with the installed kernel, I decided to install Hans de Goedes - Kernel (https://github.com/jwrdegoede/linux-sunxi) with the .config-file from nexus.

cd /usr/src
git clone https://github.com/jwrdegoede/linux-sunxi.git
rm linux
ln -s linux-sunxi linux
cp .configold linux/.config
cd linux
make oldconfig
make bzImage modules
make modules_install
cp arch/x86_64/boot/bzImage /boot/vmlinuz-degoede-4.14.0-rc3+
cp System.map /boot/System.map-degoede-4.14.0-rc3+
cp .config /boot/config-degoede-4.14.0-rc3+
cd /boot/
rm System.map
ln -s System.map-degoede-4.14.0-rc3+ System.map

generated initrd:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.14.0-rc3+

gives:

mkinitrd -c -k 4.14.0-rc3+ -f ext4 -r /dev/mmcblk0p2 -m usb-storage:sdhci:sdhci-acpi:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:ext4 -u -o /boot/initrd.gz

You have to add the mmc_block module to the modules. So

mkinitrd -c -k 4.14.0-rc3+ -f ext4 -r /dev/mmcblk0p2 -m usb-storage:sdhci:sdhci-acpi:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:ext4:mmc_block -u -o /boot/initrd.gz

gives you a proper initrd

copy the initrd and your kernel-file to

/boot/efi/EFI/Slackware/

and run

eliloconfig

now you can reboot and your pocket should start correct starting udevadm takes some time (I don't know why) but at the end there's the login-prompt and you can login as root and do all the post-installation-stuff (creating user account, tinker the xorg.conf, ...)


Dienstag, 3. Oktober 2017

uncompressing, editing and recompressing an initrd

  1. Create a directory and switch into it:

    # mkdir test
    # cd test
  2. Then uncompress and extract the initrd:

    # zcat /boot/initrd.img | cpio -idmv
  3. Edit the contents (if needed)
  4. Repack and compress the initrd image:

    # find . | cpio -o -c | gzip -9 > /boot/test.img
  5. For image compressed with xz format, use commands below to extract the initrd image.

    # mkdir /tmp/initrd
    # cd /tmp/initrd
    # xz -dc < initrd.img | cpio --quiet -i --make-directories
  6. Edit the contents (if needed)
  7. Repack and compress the initrd image:

    # cd /tmp/initrd
    # find . 2>/dev/null | cpio --quiet -c -o | xz -9 --format=lzma >"initrd.img"

found on: https://access.redhat.com/solutions/24029

Sonntag, 24. Mai 2015

moving the whole linux-system from one disk to another

There are a lot of way's doing this, I prefer this one:

1. creating the partitions needed on the destination disk
2. mounting the partitions, I prefer to mount the partitions pairwise (src + dest) under /mnt (/mnt/src + /mnt/dest)
3. syncing the filesystems with:

  • sudo rsync --stats --progress --numeric-ids -aAhHSP  /mnt/src /mnt/dest/

4. installing the new disc, booting with rescue-media and chrooting into the 'new' system:

  • sudo mount -o bind /dev /mnt/dev
  • sudo mount -o bind /sys /mnt/sys
  • sudo mount -t proc /proc /mnt/proc
  • sudo cp /proc/mounts /mnt/etc/mtab
  • sudo chroot /mnt /bin/bash

5. if needed, edit /etc/fstab and fill in correct uuid's or device-names
6. repairing grub-installation:

  • grub-install /dev/sdx
  • update-grub 

7. finally, leaving the chroot-env, unmounting all and booting into the new system

Freitag, 1. Mai 2015

…trying a blog again

after closing my old page, I’m now trying a blog again.

it will be more something like a diary or notebook to write down thoughts, code-snippets or some other stuff I won’t forget