الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

معمل 17.2RHCSA 10, الفصل 17

Change GRUB 2 boot options

المستوى
متوسط
25 دقيقة
الأجهزة
server1
الحالة
لم يبدأ

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

الهدف

Make the boot messages visible, change the menu timeout, and choose the default kernel.

قبل أن تبدأ

  • Work on server1 as root. Take a VM snapshot first: mistakes in GRUB can stop the boot.

المهام

  1. Show the kernel command line of the running kernel and the BLS entries in /boot.
  2. Remove the options rhgb and quiet from all kernels, so you see the boot messages.
  3. Set the GRUB menu timeout to 10 seconds.
  4. Show the default kernel. If you have more than one kernel, make the older one the default, check it, and set the newest back.
  5. Reboot. In the GRUB menu, press e and look at the linux line, then boot with Ctrl+X. Check the new command line.

تحقّق من عملك

cat /proc/cmdline
grubby --info=DEFAULT | grep args
grep GRUB_TIMEOUT /etc/default/grub
grubby --default-kernel
  • /proc/cmdline has no rhgb and no quiet.
  • GRUB_TIMEOUT=10 and the menu waited 10 seconds.

تلميحات

اعرض التلميحات

الحل

اعرض الحل
  1. Look at the current state.
    cat /proc/cmdline
    ls /boot/loader/entries/
  2. Remove rhgb and quiet.
    grubby --update-kernel=ALL --remove-args="rhgb quiet"
  3. Timeout of 10 seconds.
    sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=10/' /etc/default/grub
    grub2-mkconfig -o /boot/grub2/grub.cfg
  4. Default kernel.
    grubby --default-kernel
    grubby --info=ALL | grep ^kernel
    grubby --set-default /boot/vmlinuz-OLDER-VERSION
    grubby --set-default /boot/vmlinuz-$(uname -r)
  5. Reboot and check.
    systemctl reboot
    cat /proc/cmdline

ملاحظاتي

لا توجد ملاحظات بعد.

دروس هذا المعمل

الأوامر في هذا المعمل