Hot answers tagged

3

A potential intruder could reboot into single user mode if they had physical access. Physical security is just as important as software security. That is why schools lock out USB drives and the BIOS. You have to lock it down. In /etc/default/grub you can uncomment the following line GRUB_DISABLE_RECOVERY="true" And poof! Single User mode is now gone.


3

Several reasons: one, you have to have physical access to the servers, and most employees don't want to lose their jobs by getting caught on CCTV video breaking into systems. Then, you have some companies that implement BIOS / boot passwords or boot loader passwords. Sometimes, the "single user" option requires a password (if set up properly ahead of time), ...


3

The strength comes from all the other things you can do besides loading modules. Basically it gives you a userspace and the possibility of doing all the things you can do from that. An example: I use an initrd to have an encrypted root fs, setting that up requires code that there's no point having in kernel. The "Rationale" section of the Wikipedia page on ...


3

Archemar is correct, you don't need NFS for PXE, it's just convenient for diskless installations. Nfs can be used for diskless setups, where the root filesystem is mounted from a common nfs store. An example using RHEL: After creating a root filesystem (either using rsync or with yum installroot) and exporting it, In your tftpboot/pxelinux.cfg use label ...


3

You don't need NFS to use PXE booting. PXE booting consist of an IP (usualy given by DHCP server), and downloading kernel (usualy via TFTP), kernel then is loaded into memory. At this point, either the host has local disks, or not. Obviously, if you don't have local disks, you'll need some way to share resources. This is where NFS comes into play. Note ...


3

I'm not an expert, but from the source (ply-text-progress-bar.c) it looks like you set the overall percentage done and that the different colors/layers's progress is hard coded by the following, and other functions within that file: brown_fraction = -(progress_bar->percent_done * progress_bar->percent_done) + 2 * progress_bar->percent_done; ...


2

My /boot/loader/entries/arch.conf should have been title Arch Linux linux /vmlinuz-linux initrd /initramfs-linux.img options initrd=initramfs-linux.img root=PARTUUID={/dev/sda2 uuid} rw (replace {/dev/sda2 uuid} with the actual UUID)


2

The escape sequences used by systemd are hardcoded in the program, like this: #define WHITE_ON_BLACK "\033[40;37;1m" #define NORMAL "\033[0m" static void print_border(FILE *output, unsigned width) { unsigned x, y; /* Four rows of border */ for (y = 0; y < 4; y += 2) { fputs(WHITE_ON_BLACK, output); and making ...


2

I do think the shared filesystem situation is kind of evil :(. It is mitigated by a patchwork of different measures, but there are undoubtedly plenty of holes you can fall through. The shared partition case is kind of nice in that once you know it's horribly dangerous, you can "just" avoid setting the system up that way. Despite how useful it would be if ...


2

You would have to use a systemd service to run your application during boot process. Create a new file in /etc/systemd/system (e.g. myscript.service) and add the following contents: [Unit] Description=My script [Service] ExecStart=/usr/bin/my-script [Install] WantedBy=multi-user.target put your script in /usr/bin/my-script and make sure to make it ...


2

You can add the applications you want to automatically start when booting the system by adding them to Startup Applications in the tweak-tool - open the Tweak Tool from Activities launcher : Alternatively copy a .desktop file from /usr/share/applications/ to ~/.config/autostart/.


2

There are many reason to have an initramfs, some are below. When you need have a separate /usr,/var as some distros depends on having these directories in / When you want to encrypt / but you like to have /boot on a usb stick since you can't have an encrypted /boot When you don't want to have stuff in kernel builtin but instead as module, that way you only ...


1

Typically this happens if the NFS share isn't exported properly. By default, the root user is mapped to nobody. This means that when you try and run su (which is suid root) then you will try to access files on the NFS server as user nobody... and this won't let you read /etc/shadow and similar. You didn't say what your NFS server is, but if it's the ...


1

Use the command line: $ sudo rm /boot/.Trash-1000/* would empty all the files from the trash. The 1000 refers to your UID so may differ. It will begin with .Trash- though. There are two directories within this one - one called files where your deleted files reside and another called info which stores small text files containing the original filename ...


1

I suppose it's true that modern hardware wouldn't mind e.g. a 50MB kernel. You could argue that loading everything as separate modules has not been as important for a while now. However the initial ram system allows bootstrapping of any possible configuration, without needing any special handling in the kernel. Writing kernel code is a Big Deal. The ...


1

Because dd will copy the contents of the iso image along with partition table inside it, so having the USB device mounted is not recommended and backing up the contents of the USB device is because the dd command with wipe all data in it. If you have a USB stick with grub as the boot loader you can actually boot from an iso so that you don't have to wipe ...


1

I thought that maybe as "@steeldriver" user said, the network couldn't have been ready yet when the system booted, hence I edited and added "sleep 120" before the command. Now it is "@reboot sleep 120; /path/to/my/script.sh > /home/myuser/itworks.txt 2>&1". It simply works, it creates the file itworks.txt and if you "cat" it, you'll get all the info.


1

After a lot of web browsing I have not found any solution and I've made a wrapper for pygrub to be used with libvirt/kvm. Maybe this solution is useful for you, even late, so I'd like to share it. It's a libvirt hook script. The script parses the domain configuration on prepare/begin event, lets pygrub find the kernel through the available disks and then ...


1

Under GNU/Linux at boot, you should not use su (as it depends on PAM/dbus, which may not be available yet), but runuser: runuser username -l -c "screen -S sessionname -d -m /path/to/bash/script" When using runuser followed by the user name, the syntax is the same as su.



Only top voted, non community-wiki answers of a minimum length are eligible