KUNTUL | JINGKONTOT
JINGKONTOT


Server : Apache/2.4.41 (Ubuntu)
System : Linux journalup 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /sbin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //sbin/upgrade-from-grub-legacy
#!/bin/bash -e

if test ! -f /boot/grub/core.img ; then
  echo -e "\ncore.img doesn't exist, trying to create it.\n" >&2
  grub-install --no-floppy --grub-setup=/bin/true "(hd0)" > /dev/null
fi

echo RESET grub-pc/install_devices | debconf-communicate >/dev/null

# Pretend we're upgrading grub-pc.  This will make our postinst DTRT.
UPGRADE_FROM_GRUB_LEGACY=1 \
  /var/lib/dpkg/info/grub-pc.postinst configure dummy-version

if test ! -f /boot/grub/grub.cfg ; then
  echo -e "\nCalling update-grub to generate grub.cfg\n" >&2
  update-grub || cat << EOF
Failed to generate /boot/grub/grub.cfg but GRUB2 has been already installed to
your MBR.
THIS MEANS YOU HAVE CURRENTLY AN UNBOOTABLE SYSTEM.
Either fix the error from update-grub and run $0 again
or install old grub again and run grub-install from it to have again
grub-legacy in your MBR.
EOF
fi

# These never contain any valuable information, and they aren't useful for
# boot anymore, since we just overwrote MBR/PBR.
rm -f /boot/grub/{{xfs,reiserfs,e2fs,fat,jfs,minix}_stage1_5,stage{1,2}}
# Remove marker file used to indicate that grub-install was run rather than
# this script.  Since stage2 has been removed, we don't need this any more.
rm -f /boot/grub/grub2-installed

cat << EOF

GRUB Legacy has been removed, but its configuration files have been preserved,
since this script cannot determine if they contain valuable information.  If
you would like to remove the configuration files as well, use the following
command:

  rm -f /boot/grub/menu.lst*

EOF

KUNTUL | JINGKONTOT |