You are not logged in.
Now I'm more confused, because now I also lose the label when I try it, and I'm actually not sure how I could have imagined something else before.
To make it work, you'll rather have to "be clever" and restore the disk image apart from the first sector after having changed the partition table. E.g.
dd if=devuan_daedalus_5.0.1_amd64_netinstall.iso of=/dev/sdg skip=1 seek=1 conv=notruncThe partition table is really just the last 64 bytes of the first secor, and the bytes before that have not been changed by fdisk. Some bytes in some later sectors have changed though, which amounts to losing the label, The suggested copying will restore those without restoring the partition table.
I apologise for making this so confusing and convoluted.
That's peculiar that partition 1 (and the disk) loses its label.... though you had it mounted(!) when changing parition table. That's not a good idea. Is it possible to re-run the test without that? I.e., to make sure the device is unmounted when changing it with fdisk.
hmmm fdisk (mine, of package version 2.38.1-5+deb12u3devuan1) doesn't change the signature (despite the warning), and the partition is correctly marked as Empty in the partition table. It further preserves the partition label (DEVUAN501) which is the access detail used by the installer's mounting.
When you plug in the USB (on another linux) without mounting it, what does blkid /dev/sdg and blkid /dev/sdg1 say? I'd expect it to be like
/dev/sdg1: BLOCK_SIZE="2048" UUID="2023-09-14-08-12-43-00" LABEL="DEVUAN501" TYPE="iso9660" PTUUID="0650bbcb" PTTYPE="dos" PARTUUID="0650bbcb-01"The first partition should remain starting at sector 0, not 64. fdisk would have left things good despite the warning.
EDIT: ....
EDIT: I've got confused about the disk layout and have to explore this a bit. It seems xorriso changed how it does things and I have been living with the "old idea" of how it did things before, without actually confirming it.
In any case, the first partition starts at sector 0. Then the second partition comes after the first (non-overlapping). It is safe to use fdisk to change the type of the second partition and to add a 3rd primary partition.
Actually you can run fdisk on the USB stick and change the partition type to 0x0c. I.e., mark it as plain FAT32 instead of EFI (0xef). Then the partition should not be seen as an EFI partition.... and you may further mount the partition somewhere and rename its EFI directory, say to OFF, to further reduce its appearance as EFI partition.
While in fdisk, you may also add another partition for the remaining portion of the USB stick.
I wouldn't try any other partitioning tool since I would fear it may well be too intelligent and eager to be helpful to not destroy the hybrid ISO setup.
Yes, I thought I told you that it appears grub gets confused upon seeing the EFI partition of the installer, making it jump to the conclusion that the system has UEFI bios.
Probably that logic is in the grub udeb that gets installed into the installer (for the grub installation step and dialog). Though afaik it's not a forked package, but it would be good to have someone making a focussed effort on isolating the problem in detail for lodging a bug report about it.
note that you also need to follow up with
apt-get dist-upgradewhich, in addition upgrading packages, adds and removes packages according to the dependency network. To quote the man page:
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. See also apt_preferences(5) for a mechanism for overriding the general settings for individual packages.
Note that it's never too early to start reading man pages...
Sometime in life I have met USB sticks that refuse to change the first 440 bytes which is where the leagcy bios boot loader gets written. You should check that your sticks don't have that problem: e.g. write some certain data to there, take the USB out, eat an apple, plug in the USB ideally in a different port, then verify that data.
Do that twice with different data, to confirm that your data gets written and is preserved.
# dd if=data1 of=/dev/sdg bs=440 count=1
... etcNext, use the rescue approach to chroot to the target file system and install grub-pc as well as to run a manual grub-install /dev/sdg . (You might need to mount /dev and /proc for the latter; I'm not sure if the rescue entry has done chroot and those mounts)
The installation ISOs are set up as "Hybrid ISOs". This means that the ISO is a union of two data perspectives: on the one hand the ISO is a single iso9660 filesystem, and on the other hand it's a disk image with two partitions; the first partition spans the whole ISO and the second partition spans a raw image in format FAT32 within that first partition.
It's kind of like this (in beautiful ascii art):
+----------------------------------------+
| ISO image |
| +-------+ |
| | fat32 | |
| | image | |
| +-------+ |
+----------------------------------------+The iso9660 file format allows for having a DOS partition table in its first 512 bytes, so those two data perspectives blend nicely and leaves it to the device driver to pick and choose which view it adopts. A cdrom drive will adopt the view of a single iso9660, while a disk driver typically adopts the view of 2 partitions (although it's vaguely unhappy about the partitions being overlapping).
The fat32 partition is further marked as an EFI partition so that the disk view makes UEFI more happy because on "the surface" it looks like an ordinary UEFI setup.
BUT it also fools grub's intelligent install logic to make it install grub for UEFI regardless of which bios there is. Probably it just scans the disks to see if there is any EFI partition and from that jumps to the conclusion that the system has UEFI bios.
Therefore you need to exercise some manual hands-on towards the end to explicitly install the grub variant you need. This can be done either after or instead of the installer's grub installation. You where doing it right using the rescue mode.
Secondly, you cannot install linux onto a FAT32 partition because that filesystem type does not have symbolic links. You must format or reformat it into some filesystem type that can.
Or use my rrqsu ![]()
#!/bin/sh
set -e
if [ $(id -un) = root ] ; then
exec "$@"
fi
if [ "$SUDO_ASKPASS" = "$0" ] ; then
exec yad --entry --title="PASSWORD" --entry-label="$*" --hide-text
fi
exec env SUDO_ASKPASS="$0" sudo -A "$@"However wrong it is, the PC Speaker appears as an input device and is handled by the kbd module, or more specifically, Xorg looks for a keyboard device that handles bell. I think the idea is that the XBell event is actually like a KeyPress event and should be handled along the keyboard event handling path.
In any case, the kbd module is the only device handler for "bell" I've been able to find. You could also try the "evdev" module as driver. Xorg doesn't really care, but "libinput" doesn't recognise the "PC Speaker" device, so no driver gets installed.
I'm not sure how that could affect the "real" keyboard handling. The short of it is that Xorg has to install a driver for that device in order to use it.
The device, /dev/inputevent7 for you, is linked up by udev as /dev/input/by-path/platform-pcspkr-event-spkr (which you will find is a symbolic link to ../event7), and that's thus the same destination character device. But the missing link is for Xorg to install a (keyboard) driver that would have interest in the bell event(s).
EDIT: actually if you could share your Xorg.0.log with me, e.g. upload it to https://transfer.rrq.au so I could havea glance and maybe get some inspiration.... Xorg.0.log is found in either /var/log/ (if Xorg is run as root) or in ~/.local/share/xorg/ if Xorg is run by non-root user). Or email it to me.
I looked into this a bit and found a fair few ducks to line up before it worked both in console and Xorg.
For bell sound by the "xkbbell" command I needed to
add a special "InputClass" configuration snippet that tells Xorg to use the "kbd" module (from xserver-xorg-input-kbd) for the "PC Speaker" device;
configure Xorg to bell with 50% volume rather than 0%, and
enable loopback for the sound card.
My special configuration snippet /etc/X11/xorg.conf.d/pcspkeaker.conf is
Section "InputClass"
Identifier "PC Speaker"
MatchProduct "PC Speaker"
Driver "kbd"
EndSectionYou can use the "lsinput" command (from input-utils) to verify the name (i.e. the MatchProduct string) of the device. You also need to restart Xorg for loading the snippet.
The Xorg bell volume would be raised with an "xset" xommand:
# xset b 50
Loopback enabling might also be a command:
$ amixer sset 'Loopback Mixing' Enabledthough the actuals of that does depend on the soundcard; use a plain "amixer" command and guess from that.
I also needed that loopback enabling to hear a console bell.
Yes, you're right. The XkbBellNotify event is generated but nothing handles it to make the noise.
Each terminal emulator has its own code to handle keyboard input and character output/display. Some of them have configurable properties to "re-enable" audible bell and some don't.
I think you need to "activate the volume group" first; doing so will set up the dm objects for the lvms, and the /dev/mapper (symbolic) links for them, to let you mount them "by name". I believe it'd be something like:
(bogus advice removed) EDIT: check the man pages; I don't use lvm regularly (being happy enough without that confusion layer) so may well be wrong on the detail.
EDIT2: I blanked my bogus advice --- see @rolfie's post.
What do you get from lsblk ?
Usually it would amount to chroot onto the target and then run update-grub though possibly the installation of grub got confused by something (e.g. a presence of an EFI partition on the host during the installation; the installer has one) and then installed the wrong package variant.
I guess you should have the grub-pc package installed, So make sure the chroot filesystem has the right package and then run grub-install for it (which probably does require mounting of /proc, /sys and /dev) before update-grub.
@unixuser, from memory (since I don't use firefox anymore) I needed a dmix pcm on the playback path for firefox; something with firefox spawning sub processes after having opened its playback sink and then in effect accidentally lock up itself (since the normal playback is exclusive) even though firefox has a single playback process. And for that same reason, it needs the similar setup with a dsnoop on the capture path, and therefore it needs the prior asym pcm to split playback and capture.
Afair I had it working with that, something like:
pcm.!default { type asym; playback.pcm multisink; capture.pcm multisource }
pcm.multisink { type dmix; ipc_key 29879; ipc_key_add_uid true; slave.pcm plughw }
pcm.multisource { type dsnoop; ipc_key 16234; ipc_key_add_uid false; slave.pcm hw } @rankett could you please copy your /etc/apt/sources.list into a code block here.
Please note that whilst we can continue to be amazed about all your different operator habits, the OP problem was not a question about how and when to be root.
The problem was that libreoffice writer apparently added some extra "invisible" bytes to the beginning of a supposedly text file, and the solution was to remove those bytes.
If you want to organise or reorganise your forum writings into a different style wiki presentation, then it is incumbent on you to go to such a wiki site and do that.
My view is still that if one wants wiki pages to edit then one'd do that on a wiki site; if one wants to publish blogs then one'd do that on a blog site.
Each thing to its own rather than trying to shoe-horn in everything into the one system. It may require a moment of reflection on one's purpose behind the urge of sharing a thought structure, and I find that to be a good thing in itself even though it might place the rendering of that thought structure elsewhere than on this forum.
Interesting. the three dots matched 5 bytes... probably due to encoding. Now you can edit with, say, nano to add the missing "de" and save, then verify it with hexdump, and it should be ok.
EDIT: so, apparently it's libreoffice writer that adds those bytes. Thus, don't use that for editing text files. I suppose it seems that GUI tool developers nowadays don't really know what they are doing
Those first three bytes are some kind of byte-order marker which is something that Window's Notepad likes to drop into text files, and you should remove them. You could do that with the folllowing command (do it ONCE only as it will otherwise remove the next three bytes):
sed '1s/^...//' -i /etc/apt/sources.listThen, it should go without saying, never never never use Window's Notepad to edit text files.
(Of course I may well be wrong about Notepad
)
Put the output of the folling into a "code" block:
hexdump -C /etc/apt/sources.list | head -n 5... so we can look at the beginning of the file.