Outils pour utilisateurs

Outils du site


tech:boot_systemd_boot_non-graphique

Boot systemd boot non-graphique

Source : Non-graphical boot with systemd

Voir aussi https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Targets.html

Testé sur Debian 8 Jessie

Open a terminal and (as root) run:

systemctl set-default multi-user.target

ou avec --force

systemctl set-default -f multi-user.target

Retour arrière - réactivation mode graphique

systemctl set-default graphical.target

Vérif

systemctl get-default

Boot paramètre noyaux Linux

parameter to your kernel boot line

systemd.unit=multi-user.target

Ajout nouvelle entrée au grub sous Debian

Sous Debian

vimdiff /boot/grub/grub.cfg /boot/grub/custom.cfg
/boot/grub/custom.cfg
menuentry 'Debian GNU/Linux nographic' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-816ff92d-1a71-4f82-b009-a5ef6f469a25' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  82c94e9f-f7c8-40dc-9e94-9d0afcac7fe6
        else
          search --no-floppy --fs-uuid --set=root 82c94e9f-f7c8-40dc-9e94-9d0afcac7fe6
        fi
        echo    'Loading Linux 3.16.0-4-amd64 ...'
        linux   /vmlinuz-3.16.0-4-amd64 root=/dev/mapper/vgos-root ro systemd.unit=multi-user.target
        echo    'Loading initial ramdisk ...'
        initrd  /initrd.img-3.16.0-4-amd64
}
cat /boot/grub/grub.cfg |sed -ne '/^menuentry/,/}/p' |sed -e 's/\(linux.*\) quiet/\1 systemd.unit=multi-user.target/' |sed -e 's%Debian GNU/Linux%Debian GNU/Linux NonGraphique%' > /boot/grub/custom.cfg

Changer le runlevel / target maintenant

# runlevel
systemctl list-units --type target
# telinit 3
# init 3
systemctl isolate multi-user.target
 
# init 5
systemctl isolate graphical.target

Autres

#unlink /etc/systemd/system/default.target
#ln -sf /lib/systemd/system/multi-user.target /etc/systemd/system/default.target
systemctl set-default multi-user.target  
tech/boot_systemd_boot_non-graphique.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki