Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Customizing boot-process and GRUB

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
Joost1985
Posts: 1
Joined: 2018-10-04 10:42

Customizing boot-process and GRUB

#1 Post by Joost1985 »

Dear all,

I have a fresh Debian Stretch install and I am trying to modify the boot process.
This is what I have in mind.

There are three options for booting:
  • 1. As a regular user (standard)
    2. As an administrator
    3. Password based
I would like to add these to Grub as menu entries, but I cannot seem to manage.
The resulting boot process should be as follows for the different options:
  • 1. The initramfs image should read a specific usb-device which has a key on it to unlock the encrypted devices and should login as the user which is set on the usb-device.
    2. The initramfs image should read the administrator usb-device and get the administrator skeleton-key to unlock all encrypted devices and login as administrator.
    3. This is a backup in case 1 and 2 fail s.t. you can unlock the encrypted devices by typing in a passphrase.
I would like to generate a different initrd image for all different options using scripts in /etc/initramfs-tools.

If you have a different solution feel free to let me know, however I am also interested in getting my option to work for my learning curve.
The next step is to automate the proces based on the (un)inserted specific usb-device.

In /boot I have three different images name: vmlinuz-4.9.0-4-686-pae(-pw / -user / -admin) and initrd.img-4.9.0-4-686-pae(-pw / -user / -admin).
I am trying to edit /etc/grub.d/40_custom for the menu entries, but cannot get it to work.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Customizing boot-process and GRUB

#2 Post by GarryRicketson »

I don't think the Grub boot menu is intended to be used this way.
You could have done some searches to confirm that:
what is Grub2 for
=============
1 of many hits:https://opensource.com/article/17/3/int ... tion-linux
Grub is a boot menu, used to determine which system will boot, it does not determine who would log in. That is done after the system boots, and then the user has the login prompt, for a multi user system , you use the 'add user' or 'user add ' command. You could have 3 or even more users, 1. the normal user, whom is identified by a "username". You might even have several normal users, each one identified with the username.
The 2nd user, that is the admin, is still identified by the username, and has administrative privileges, the permissions are determined by what groups, and specific permissions are assigned to each user group.
==================================
what is the linux login prompt for
============
1 of many hits: http://man7.org/linux/man-pages/man1/login.1.html
====
The rest, about the USB device and encryption are completely different topics, it is not good to ask multiple questions in 1 topic, because that results in a confusing topic, that is a mixed up thread on various topics.
===============
Last but not least,
Post by Joost1985 » 2018-10-04 05:01

Dear all,

I have a fresh Debian Stretch install and I am trying to modify the boot process.
This is what I have in mind.
So, you have installed Debian, and it is working ? If so, you really need to learn more about your new Debian system, for example, adding users, groups,and setting permissions for each user, and then there is much more,...Have you read any of the Debian documentation ?
Any way, before you go and start messing around with Grub and the boot process, learn a little about Linux and you new Debian system. If what you are trying to do is set up a "multi boot" system, there is documentation on that, but the login is still the same, "root" can login as administrator, to do that the user must know the root password, the same , each user , must know thier password, if a user has the permissions, they can become root, using su or sudo, there is to much to say here, you really just need to do a lot of reading,and learn a little about Debian, and Linux first.

Post Reply