Prepariamo il nostro HD esterno e partizionamolo (vedi la struttura qui sotto), usando GParted ... i Megabytes e Gigabytes,
li otterremo moltiplicando le grandezze per il multiplo, ovvero 1024, così, 100 Gb = 102400 Mib, 30 Gb = 30720 Mib, 2.5 Gb = 2560 Mib, ecc.
Premessa, nel mio caso ho la device come sdc, ma potrebbe essere sdb o altro in generale sdXY
Dove sdXY deve essere sostituito con il vostro device (X=HD_partizione e Y=Partizione_numero es. sda1)
Codice: Seleziona tutto
sdc 8:32 0 465,8G 0 disk
├─sdc1 8:33 0 100G 0 part /media/root/MULTISYSTEM1
├─sdc2 8:34 0 30G 0 part /media/root/Ubuntu 17.10
├─sdc3 8:35 0 2,5G 0 part
├─sdc4 8:36 0 1K 0 part
├─sdc5 8:37 0 30G 0 part /media/root/Windows
└─sdc6 8:38 0 30G 0 part /media/root/Kali
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/sdc1 * 2048 209717247 209715200 100G b W95 FAT32
/dev/sdc2 209717248 272631807 62914560 30G 83 Linux
/dev/sdc3 272631808 277874687 5242880 2,5G 82 Linux swap / Solaris
/dev/sdc4 277874688 976773119 698898432 333,3G 5 Esteso
/dev/sdc5 277876736 340791295 62914560 30G 7 HPFS/NTFS/exFAT
/dev/sdc6 340793344 403707903 62914560 30G 83 Linux
Installiamo MULTISYSTEM e diamogli in pasto il nostro HD, installerà il bootloader e le ISO che vorrete.
Ora passiamo alla seconda fase, installazione delle distribuzioni Ubuntu_17.10 e Kali.
Fare il download delle iso e creare le USB Key per installazione (ho usato UnetBootin, ma anche altri vanno bene), prepaprare una alla volta le
USB key ed installare nell'HD Multiboot i sistemi operativi Ubuntu e Kali.
Adesso faremo le copie delle partizioni, così da avere un template per ricreare altri HD senza rifare tutto il lavoro.
Per la copia (nel caso che l'automount abbia già montato le partizioni usare quelle :
Codice: Seleziona tutto
sudo lsblk
sdc 8:32 0 465,8G 0 disk
├─sdc1 8:33 0 100G 0 part /media/MULTISYSTEM
├─sdc2 8:34 0 30G 0 part /media/Ubuntu_17.10
├─sdc3 8:35 0 2,5G 0 part
├─sdc5 8:37 0 30G 0 part /media/Windows
└─sdc6 8:38 0 30G 0 part /media/Kali
Codice: Seleziona tutto
sudo mkdir /media/usb
sudo mount /dev/sdc1 /media/usb
sudo cp -r -p -v "/media/usb/"{[!.],.[!.],..?}* "/media/Dati/MULTISYSTEM/"
sudo umount /dev/sdc1
sudo mount /dev/sdc2 /media/usb
sudo cp -r -p -v "/media/usb/"{[!.],.[!.],..?}* "/media/Dati/Ubuntu_17.10/"
sudo umount /dev/sdc1
sudo mount /dev/sdc6 /media/usb
sudo cp -r -p -v "/media/usb/"{[!.],.[!.],..?}* "/media/Dati/Kali/"
sudo umount /dev/sdc1
nel caso avessimo problemi con HD, come errori gravi.
Lo faremo utilizzando il comando Partclone, ma lo vedremo più in là !
Ora bisogna fare le correzioni ai grub.cfg nelle partizioni dell'HD Multiboot, che stiamo creando.
Importante modificare i grub.cfg di MULTISYSTEM - Ubuntu_17.10 - Kali (gli UUID cambiano dopo ogni formattazione), tutto si basa sugli UUID !!!
Lanciare il comando lsblk e blkid e segnarsi gli UUID da andare a sostituire nei grub.cfg
Questi sono i miei, che troverete nei grub.cfg postati, ma i vostri saranno diversi
Codice: Seleziona tutto
lsblk
sdc 8:32 0 465,8G 0 disk
├─sdc1 8:33 0 100G 0 part /media/MULTISYSTEM
├─sdc2 8:34 0 30G 0 part /media/Ubuntu_17.10
├─sdc3 8:35 0 2,5G 0 part
├─sdc5 8:37 0 30G 0 part /media/Windows
└─sdc6 8:38 0 30G 0 part /media/Kali
blkid
/dev/sdc1: LABEL="MULTISYSTEM" UUID="AE62-0985" TYPE="vfat" PARTUUID="f1c182ad-01"
/dev/sdc2: LABEL="Ubuntu 17.10" UUID="76e2c4da-9bd0-43ce-87f3-e697e93a8823" TYPE="ext4" PARTUUID="f1c182ad-02"
/dev/sdc3: UUID="361199cf-352a-4779-aeed-aa82b219a7ef" TYPE="swap" PARTUUID="f1c182ad-03"
/dev/sdc5: LABEL="Windows" UUID="047B1D876AFE9110" TYPE="ntfs" PTTYPE="dos" PARTUUID="f1c182ad-05"
/dev/sdc6: LABEL="Kali" UUID="7eeda750-c4cf-4d26-898e-4d9e694c3470" TYPE="ext4" PARTUUID="f1c182ad-06"
"MULTISYSTEM" UUID="AE62-0985"
"Ubuntu 17.10" UUID="76e2c4da-9bd0-43ce-87f3-e697e93a8823"
"Windows" UUID="047B1D876AFE9110"
"Kali" UUID="7eeda750-c4cf-4d26-898e-4d9e694c3470"
(l'automount ci monterà in media/root/ il MULTISYSTEM)
/media/root/MULTISYSTEM/boot/grub/grub.cfg
Useremo GEdit con la funzione trova e sostituisci tutti ...
Leggiamo il primo UUID relativo alla partizione MULTISYSTEM vecchia e avremo UUID=AE62-0985 (il vecchio mio),
mentre quello nuovo (il vostro sarà diverso) UUID=DA54-7451 applichiamo trova e sostituisci ...
Facciamo lo stesso per l'UUID della partizione Ubuntu_17.10, il mio vecchio UUID=76e2c4da-9bd0-43ce-87f3-e697e93a8823
mentre il nuovo sarà, UUID=e1b2070a-0b38-42ac-9e39-8960a6ad458e applichiamo trova e sostituisci ...
Facciamo lo stesso per l'UUID della partizione Kali, il mio vecchio UUID=7eeda750-c4cf-4d26-898e-4d9e694c3470
mentre il nuovo sarà, UUID=18a7ae9b-820f-413f-a418-e3a8c176342c applichiamo trova e sostituisci ...
Salviamo ed andiamo ad editare il grub.cfg sulla partizione Ubuntu_17.10, poichè sono presenti UUID anche lì
(l'automount ci monterà in media/root/ il Ubuntu_17.10)
/media/root/Ubuntu_17.10/boot/grub/grub.cfg
Facciamo come prima per l'UUID della partizione Ubuntu_17.10, il mio vecchio UUID=76e2c4da-9bd0-43ce-87f3-e697e93a8823
mentre il nuovo sarà, UUID=e1b2070a-0b38-42ac-9e39-8960a6ad458e applichiamo trova e sostituisci ...
Salviamo ed andiamo ad editare il grub.cfg sulla partizione Kali, poichè sono presenti UUID anche lì
(l'automount ci monterà in media/root/ il Kali)
/media/root/Kali/boot/grub/grub.cfg
Facciamo come prima per l'UUID della partizione Kali, il mio vecchio UUID=7eeda750-c4cf-4d26-898e-4d9e694c3470
mentre il nuovo sarà, UUID=18a7ae9b-820f-413f-a418-e3a8c176342c applichiamo trova e sostituisci ...
Salviamo ed andiamo a dare l'ultimo comando da terminale che riscriverà il bootloader sulla partizione MULTISYSTEM,
rendendo nuovamente bootable l'HD
sudo grub-install --force --no-floppy --target=i386-pc --boot-directory=/media/root/MULTISYSTEM/boot /dev/sdX
Dove sdXY deve essere sostituito con il vostro device (X=HD_partizione)
Seguendo il mio esempio avrei
sudo grub-install --force --no-floppy --target=i386-pc --boot-directory=/media/root/MULTISYSTEM/boot /dev/sdc
Oppure in alternativa lo facciamo fare a MULTISYSTEM come abbiamo fatto inizialmente (include la funzione install Grub2)
Ora andiamo a verificare, facendo il reboot da HD esterno (in genere tasto F12)
I files grub.cfg :
MULTISYSTEM
Codice: Seleziona tutto
#insmod gpt
#insmod pc
#insmod gfxmenu
#
#insmod videotest
insmod tga
insmod png
insmod gfxterm
insmod lspci
#insmod vbeinfo
insmod vbe
insmod ntfs
insmod chain
insmod biosdisk
insmod font
#http://grub.enbug.org/ThemeFormat
#http://grub.gibibit.com/Theme_format#colors
#http://code.google.com/p/burg/wiki/InstallUbuntu
#http://code.google.com/p/burg/downloads/list
#http://ubuntuforums.org/showthread.php?t=1195275
#pour acces a grub2 du bootloader principal modifier dans fichier: /etc/default/grub
#GRUB_HIDDEN_TIMEOUT=10 #0 par defaut
#GRUB_HIDDEN_TIMEOUT_QUIET=false #true d'origine
#sudo update-grub
#echo -n "Press ESC to see the menu... "
#if sleep --verbose --interruptible 5 ; then
#set timeout=0
#fi
set default=0
set timeout=30
set fallback=1
search --no-floppy --fs-uuid --set=root AE62-0985
set root=${root}
#http://grub.enbug.org/gfxterm
if loadfont /boot/polices/unicode.pf2 ; then
set gfxmode=1024x768
set gfxpayload=1024x768x32,1024x768
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if background_image /boot/splash/splash.png ; then
#text no sel/fond ecran
#set color_normal=white/black #1
set color_normal=blue/black #1
#text sel/fond ecran sel
set color_highlight=green/white #1
else
#set menu_color_normal=white/black #2
set menu_color_normal=blue/black #2
set menu_color_highlight=green/white #2
set color_normal=white/magenta #2
set color_highlight=green/white #2
fi
#
#
#Pour activer le thème graphique multisystem décommentez les 4 lignes ci-dessous
#set gfxmode=640x480
#set theme=($root)/boot/grub/themes/multisystem/theme.txt
#export theme
#loadfont /boot/grub/themes/multisystem/fonts/Helvetica-8.pf2
#
#
#Ne supprimez pas ce marqueur! / Do not remove this marker!
#MULTISYSTEM_START
#MULTISYSTEM_MENU_DEBUT|29-11-2017-15:50:17-048426259|ms-lts-16.04-amd64-r2.iso|multisystem-icon|1304Mio|
#menuentry "MultiSystem live French (toram)" --class ms --class linux --class os {
#search --set -f "/ms-lts-16.04-amd64-r2.iso"
#loopback loop "/ms-lts-16.04-amd64-r2.iso"
#linux (loop)/casper/vmlinuz.efi toram root=UUID=AE62-0985 iso-scan/filename=/ms-lts-16.04-amd64-r2.iso debian-installer/locale=fr_FR.UTF-8 debian-#installer/language=fr kbd-chooser/method=fr console-setup/layoutcode=fr console-setup/variantcode=oss console-setup/modelcode=pc105 ignore_uuid #boot=casper noprompt quiet splash --
#initrd (loop)/casper/initrd.lz
#}
menuentry "MultiSystem live English (toram)" --class ms --class linux --class os {
search --set -f "/ms-lts-16.04-amd64-r2.iso"
loopback loop "/ms-lts-16.04-amd64-r2.iso"
linux (loop)/casper/vmlinuz.efi toram root=UUID=AE62-0985 iso-scan/filename=/ms-lts-16.04-amd64-r2.iso debian-installer/locale=en_US.UTF-8 debian-installer/language=us kbd-chooser/method=us console-setup/layoutcode=us console-setup/modelcode=pc105 ignore_uuid boot=casper noprompt quiet splash --
initrd (loop)/casper/initrd.lz
}
#MULTISYSTEM_MENU_FIN|29-11-2017-15:50:17-048426259|ms-lts-16.04-amd64-r2.iso|multisystem-icon|1304Mio|
#MULTISYSTEM_STOP
#Ne supprimez pas ce marqueur! / Do not remove this marker!
#Chainloader to another grub - Ubuntu 17.10
menuentry "Ubuntu 17.10, grub.cfg on /dev/sda2" {
insmod part_msdos
insmod ext2
set root=(hd0,2)
set color_normal=white/black #1
set menu_color_normal=white/black #2
set gfxpayload=1024x768x32,1024x768
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
configfile (hd0,2)/boot/grub/grub.cfg
}
#Chainloader to another grub - Kali 2017.3
menuentry "kali 2017.3 , grub.cfg on /dev/sda6" {
insmod part_msdos
insmod ext2
set root=(hd0,6)
set color_normal=white/black #1
set menu_color_normal=white/black #2
set gfxpayload=1024x768x32,1024x768
search --no-floppy --fs-uuid --set=root 7eeda750-c4cf-4d26-898e-4d9e694c3470
configfile (hd0,6)/boot/grub/grub.cfg
}
menuentry "______________Grub4Dos______________" {
echo
}
#http://grub4dos.sourceforge.net/
#http://grub4dos.sourceforge.net/wiki/index.php/Grub4dos_tutorial
menuentry "Grub4Dos" {
linux /boot/grub.exe --config-file=/boot/grub/menu.lst
}
menuentry "______________Syslinux______________" {
echo
}
#solution tordue, mais qui passe partout ...
#menuentry "Syslinux" {
#search --set -f /boot/syslinux/redir.img
# linux16 /boot/syslinux/memdisk
# initrd16 /boot/syslinux/redir.img
#}
#http://syslinux.zytor.com
menuentry "Syslinux" {
search --set -f "/boot/syslinux/ldlinux.sys"
drivemap -s (hd0) $root
chainloader +1
}
#Autre solution pour chainer Syslinux via une copie du mbr
#dd if=/dev/sd?1 of=/media/multisystem/boot/img/syslinux.mbr bs=512 count=1
#menuentry "Syslinux" {
#search --set -f "/boot/img/syslinux.mbr"
#drivemap -s (hd0) $root
#chainloader /boot/img/syslinux.mbr
#}
menuentry "______________UTIL______________" {
echo
}
## for debugging set debug=efi
#menuentry "0-testfakebios" {
# hexdump -s 0xc0000 (mem)
# fakebios
# hexdump -s 0xc0000 (mem)
## deliberate error to get wait for key
# xxx
#}
#How to test GRUB 2 on Macbook
#http://grub.enbug.org/TestingOnMacbook
#
#http://wiki.gentoo.org/wiki/GRUB2
#
#menuentry "Windows 7 BIOS/MBR" {
# insmod part_msdos
# insmod ntldr
# insmod ntfs
# ntldr (hd0,msdos1)/bootmgr
#}
#menuentry "Windows XP BIOS/MBR" {
# insmod part_msdos
# insmod ntldr
# insmod ntfs
# ntldr (hd0,msdos1)/ntldr
#}
#
#chainer un autre grub
#menuentry "grub.cfg auf /dev/sdb1" {
# configfile (hd1,1)/boot/grub/grub.cfg
#}
#menuentry "Chain other configfile" {
#configfile /boot/grub/grub-xxx.cfg
#}
#
#menuentry "Return default menu" {
#chainloader /boot/grub/boot.img
#}
#chainer win ou autre OS
#menuentry "Chainer UUID de la partition" {
#insmod=ntfs
#set root=(hd0,1)
#search --no-floppy --fs-uuid --set=root xxx-xxx
# drivemap -s (hd0) $root
# chainloader +1
#}
#Booter une iso avec memdisk
#menuentry "FreeBSD" {
# search --set -f "/FreeBSD-10.2-RELEASE-amd64-bootonly.iso"
# linux16 /boot/syslinux/memdisk iso raw
# initrd16 /FreeBSD-10.2-RELEASE-amd64-bootonly.iso
#}
#Booter une iso avec loopback.cfg
#menuentry "TITLE" {
# iso_path=/path.iso
# export iso_path
# search --set=root --file $iso_path
# loopback loop $iso_path
# root=(loop)
# configfile /boot/grub/loopback.cfg
# loopback --delete loop
#}
#http://www.plop.at/en/bootmanagerdl.html
menuentry "PLoP Boot Manager" {
linux16 /boot/img/plpbt
}
#http://www.supergrubdisk.org/
#http://developer.berlios.de/project/showfiles.php?group_id=10921
#SG2D (Floppy, CD & USB in one)
#super_grub_disk_hybrid-1.98s1.iso
menuentry "Super Grub2 Disk" {
search --set -f /boot/img/sgdh.iso
linux16 /boot/syslinux/memdisk
initrd16 /boot/img/sgdh.iso
}
menuentry "Super Grub Disk" {
search --set -f /boot/img/sgdfr.img
linux16 /boot/syslinux/memdisk
initrd16 /boot/img/sgdfr.img
}
menuentry "Smart Boot Manager" {
search --set -f /boot/img/sbootmgr.dsk
linux16 /boot/syslinux/memdisk
initrd16 /boot/img/sbootmgr.dsk
}
#Site: http://boot.kernel.org/index.html
#Téléchargement: http://boot.kernel.org/gpxe_images/gpxe.lkrn
menuentry "BKO (boot.kernel.org)" {
search --set -f /boot/img/gpxe.lkrn
linux16 /boot/img/gpxe.lkrn
}
#http://www.memtest.org/#downiso
menuentry "memtest86+" {
linux16 /boot/img/memtest86+.bin
}
menuentry "vbeinfo" {
vbeinfo
read
}
menuentry "lspci" {
lspci
read
}
menuentry "gfxpayload 640x480" {
set gfxpayload=640x480
echo gfxpayload=${gfxpayload} press enter
read
}
menuentry "gfxpayload 800x600" {
set gfxpayload=800x600
echo gfxpayload=${gfxpayload} press enter
read
}
menuentry "gfxpayload 1024x768" {
set gfxpayload=1024x768
echo gfxpayload=${gfxpayload} press enter
read
}
menuentry "gfxpayload 1280x1024" {
set gfxpayload=1280x1024
echo gfxpayload=${gfxpayload} press enter
read
}
menuentry "Reboot" {
insmod reboot
reboot
}
Codice: Seleziona tutto
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=it_IT
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30,0; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-76e2c4da-9bd0-43ce-87f3-e697e93a8823' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
linux /boot/vmlinuz-4.13.0-16-generic root=UUID=76e2c4da-9bd0-43ce-87f3-e697e93a8823 ro quiet splash $vt_handoff
initrd /boot/initrd.img-4.13.0-16-generic
}
submenu 'Opzioni avanzate per Ubuntu' $menuentry_id_option 'gnulinux-advanced-76e2c4da-9bd0-43ce-87f3-e697e93a8823' {
menuentry 'Ubuntu, con Linux 4.13.0-16-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-16-generic-advanced-76e2c4da-9bd0-43ce-87f3-e697e93a8823' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
echo 'Caricamento Linux 4.13.0-16-generic...'
linux /boot/vmlinuz-4.13.0-16-generic root=UUID=76e2c4da-9bd0-43ce-87f3-e697e93a8823 ro quiet splash $vt_handoff
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-4.13.0-16-generic
}
menuentry 'Ubuntu, con Linux 4.13.0-16-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-16-generic-recovery-76e2c4da-9bd0-43ce-87f3-e697e93a8823' {
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
echo 'Caricamento Linux 4.13.0-16-generic...'
linux /boot/vmlinuz-4.13.0-16-generic root=UUID=76e2c4da-9bd0-43ce-87f3-e697e93a8823 ro recovery nomodeset
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-4.13.0-16-generic
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
knetbsd /boot/memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 76e2c4da-9bd0-43ce-87f3-e697e93a8823
else
search --no-floppy --fs-uuid --set=root 76e2c4da-9bd0-43ce-87f3-e697e93a8823
fi
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Codice: Seleziona tutto
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 7eeda750-c4cf-4d26-898e-4d9e694c3470
else
search --no-floppy --fs-uuid --set=root 7eeda750-c4cf-4d26-898e-4d9e694c3470
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=it_IT
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Kali GNU/Linux' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-7eeda750-c4cf-4d26-898e-4d9e694c3470' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 7eeda750-c4cf-4d26-898e-4d9e694c3470
else
search --no-floppy --fs-uuid --set=root 7eeda750-c4cf-4d26-898e-4d9e694c3470
fi
echo 'Caricamento Linux 4.13.0-kali1-amd64...'
linux /boot/vmlinuz-4.13.0-kali1-amd64 root=UUID=7eeda750-c4cf-4d26-898e-4d9e694c3470 ro quiet
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-4.13.0-kali1-amd64
}
submenu 'Opzioni avanzate per Kali GNU/Linux' $menuentry_id_option 'gnulinux-advanced-7eeda750-c4cf-4d26-898e-4d9e694c3470' {
menuentry 'Kali GNU/Linux, con Linux 4.13.0-kali1-amd64' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-kali1-amd64-advanced-7eeda750-c4cf-4d26-898e-4d9e694c3470' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 7eeda750-c4cf-4d26-898e-4d9e694c3470
else
search --no-floppy --fs-uuid --set=root 7eeda750-c4cf-4d26-898e-4d9e694c3470
fi
echo 'Caricamento Linux 4.13.0-kali1-amd64...'
linux /boot/vmlinuz-4.13.0-kali1-amd64 root=UUID=7eeda750-c4cf-4d26-898e-4d9e694c3470 ro quiet
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-4.13.0-kali1-amd64
}
menuentry 'Kali GNU/Linux, with Linux 4.13.0-kali1-amd64 (recovery mode)' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.13.0-kali1-amd64-recovery-7eeda750-c4cf-4d26-898e-4d9e694c3470' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 7eeda750-c4cf-4d26-898e-4d9e694c3470
else
search --no-floppy --fs-uuid --set=root 7eeda750-c4cf-4d26-898e-4d9e694c3470
fi
echo 'Caricamento Linux 4.13.0-kali1-amd64...'
linux /boot/vmlinuz-4.13.0-kali1-amd64 root=UUID=7eeda750-c4cf-4d26-898e-4d9e694c3470 ro single
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-4.13.0-kali1-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
1. Lanciato il S.O in uso (sia Ubunto che Kali) si dovranno aggiornare le informazioni sulle partizioni da montare all'avvio editando il file '/etc/fstab'
Approdati nel S.O su HD Multiool, aprire il terminale ed eseguire il comando qui sotto e copiare gli UUID da aggiornare nel file fstab
Codice: Seleziona tutto
lsblk -f
AME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat PQSERVICE EAEE-EB49
├─sda2 ntfs Win7 EACC3A77CC3A3DDF
└─sda3 ntfs Data CAB62CB1B62C9FC5
sdb
├─sdb1 vfat MULTISYSTEM AE62-0985 /media/root/MULTISYSTEM
├─sdb2 ext4 Ubuntu/17.10 fe2fb390-21d4-420d-9881-9fa273ab621d /media/root/Ubuntu_17.10
├─sdb3 swap 361199cf-352a-4779-aeed-aa82b219a7ef
├─sdb4
├─sdb5 ntfs Windows 047B1D876AFE9110 /media/root/Windows
└─sdb6 ext4 Kali 609d80aa-e7c3-4738-8bad-8fbc7b687a47 /
sr0
├─sdb1 vfat MULTISYSTEM AE62-0985 /media/root/MULTISYSTEM
├─sdb2 ext4 Ubuntu/17.10 fe2fb390-21d4-420d-9881-9fa273ab621d /media/root/Ubuntu_17.10
├─sdb3 swap 361199cf-352a-4779-aeed-aa82b219a7ef
├─sdb5 ntfs Windows 047B1D876AFE9110 /media/root/Windows
└─sdb6 ext4 Kali 609d80aa-e7c3-4738-8bad-8fbc7b687a47 /
Lanciare GEdit e caricare il file /etc/fstab, seguendo la tabella delle partizioni ottenuta aggiornare gli UUID presenti nel file e salvare.
Al prossimo riavvio la tabella verrà caricata montando senza errori le partizioni elencate.
Codice: Seleziona tutto
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=AE62-0985 /media/root/MULTISYSTEM auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=MULTISYSTEM 0 0
UUID=fe2fb390-21d4-420d-9881-9fa273ab621d /media/root/Ubuntu_17.10 auto nosuid,nodev,nofail,x-gvfs-show 0 0
UUID=a5595ffe-61a4-4e64-8b9b-f0dc635778a1 none swap sw 0 0
UUID=047B1D876AFE9110 /media//root/Windows auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Windows 0 0
UUID=609d80aa-e7c3-4738-8bad-8fbc7b687a47 / ext4 errors=remount-ro,x-gvfs-show,x-gvfs-name=Kali 0 1
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Esempio di backup e recovery delle partizioni dell'HD Multiboot ...
1.. Backup
Codice: Seleziona tutto
sudo partclone.extfs -c -s /dev/sdc2 | gzip -c > "/media/Dati/Grub2 Boot folders/Multisystem HD/2 Ubuntu_17.10/sdc2.img.gz"
Codice: Seleziona tutto
sudo gunzip < "/media/Dati/Grub2 Boot folders/Multisystem HD/2 Ubuntu_17.10/sdc2.img.gz" | partclone.extfs -r -s - -o /dev/sdc2