Le seguenti 356 parole non sono state trovate nel dizionario di 1275 termini (includendo 1275 LocalSpellingWords) e sono evidenziate qui sotto:
0x   0x00000000   About   af   again   almost   amd   amd64   another   apparmor   arch   archlinux   ask   at   auto   B2   background   basic   be   because   below   bg   bin   black   block   blocks   Boot   boot   bootable   both   boum   bt   bug   bugreport   bugs   by   bytes   cd   cdimage   cfg   Changed   checks   codes   color   command   Command   commands   complete   completed   config   configure   convert   converting   creates   Creating   Cs   current   Current   customize   dangerous   Debian   debian   debianvm   decide   default   delete   deletes   dev   Device   devsdc2   dfl   disk   Disk   Disklabel   distros   dists   don   done   dos   down   download   Download   drive   echo   efi   else   enter   Enter   entries   entry   Etc   events   exfat   Exit   explain   F00   F02   F32   fat   fdisk   fi   file   files   filesystem   Final   Find   findiso   finished   flag   flaky   folder   folders   following   font   fonts   for   format   Found   from   From   gdisk   get   gfxmode   gfxpayload   gfxterm   Gi   give   good   gop   gray   green   grub   grub2   gz   halt   hd   help   Hex   hex   hit   ho   https   Hybrid   hybrid   i2p   i386   Id   identifier   ie   if   If   image   images   img   imgdevpath   index   initrd   initrd2   initrdfile   insmod   Installation   installation   Installer   installer   Installing   instructions   into   invalid   iso   isofile   its   Jessie   jpeg   jpg   just   keep   kernel   key   known   last   Last   let   Let   light   live   loadfont   logical   loop   loopback   main   Main   make   many   media   memory   menu   menuentry   Microsoft   mine   minimum   mirrors   mkdir   mkfs   mnt   module   mount   mounted   msecs   Multiboot   need   new   noautologin   nopersistent   noprompt   normal   Now   now   number   numbers   ok   on   one   only   operation   optimal   or   Os   others   output   overlaps   packages   partition   Partition   partitions   partitons   pass   pc   pf2   php   physical   Place   platform   poll   prefix   present   press   probe   proceed   Proceed   prompt   protective   put   quit   reads   ready   reboot   Reboot   rebooting   recheck   Recovery   removable   rename   reported   require   Requisites   resize   right   root   rootuuid   Rs   scan   sdc   sdc1   sdc2   sdc3   second   Secondary   Sector   sector   sectors   Sectors   security   separated   sequence   Set   set   shell   should   show   Shutdown   shutting   sites   size   Size   Some   some   Sources   spaces   stable   Step   step   successfully   System   T32   table   tails   Tails   target   terminal   that   then   Then   there   these   this   This   three   timezone   to   torrent   torrents   transformation   true   two   type   Type   typing   uga   Umount   umount   unicode   Units   unmount   untouched   use   using   utility   uuid   valid   vbe   vmlinuz   vmlinuz2   want   Warning   We   we   white   will   with   workaround   working   works   write   writing   x86   xfce  

Nascondi questo messaggio
Italiano English
Modifica History Actions

Hybrid_UEFI_MBR_USB_Drive

An Hybrid UEFI GPT + BIOS GPT/MBR boot USB disk is a disk that works on both UEFI and BIOS PCs.

Requisites:

  • A working Linux installation with the following packages: grub2, grub2-efi, gdisk (on Debian Jessie: grub-pc-bin, grub-efi, grub-efi-amd64, gdisk)

  • An USB drive
  • Some Linux ISO.

Step 1: get the right /dev

From now on we will use a root shell because almost all commands we will use require it.

root@debianvm:~# fdisk -l

...............

Disk /dev/sdc: 14.9 GiB, 16005464064 bytes, 31260672 sectors
Unitssectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel typedos
Disk identifier0x00000000

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1           2 31260671 31260670 14.9G af HFS / HFS+

Find the right dev (ie: mine was /dev/sdc and I WILL USE IT IN THE GUIDE, you have to use your dev).

Step 2: make GUID partition table and partitions

root@debianvm:~# gdisk /dev/sdc
And then we are in gdisk prompt; from now on just give the commands in bold and the press enter.

GPT fdisk (gdisk) version 0.8.10

Partition table scan:

  • MBR: MBR only
    BSD: not present
    APM: not present
    GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************

WarningMain partition table overlaps the first partition by 32 blocks!
You will need to delete this partition or resize it in another utility.

WarningSecondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): n Partition number (1-128, default 1): 
First sector (34-31260638, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-31260638, default = 31260638) or {+-}size{KMGTP}: +1M
Current type is 'Linux filesystem' Hex code or GUID (L to show codesEnter = 8300): EF02
Changed type of partition to 'BIOS boot partition'

Command (? for help): n
Partition number (2-128, default 2):
First sector (34-31260638, default = 4096) or {+-}size{KMGTP}:
Last sector (4096-31260638, default = 31260638) or {+-}size{KMGTP}: +50M
Current type is 'Linux filesystem'
Hex code or GUID (L to show codesEnter = 8300): EF00
Changed type of partition to 'EFI System'

Command (? for help): n
Partition number (3-128, default 3):
First sector (34-31260638, default = 106496) or {+-}size{KMGTP}:
Last sector (106496-31260638, default = 31260638) or {+-}size{KMGTP}: 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codesEnter = 8300): 0700
Changed type of partition to 'Microsoft basic data'

Command (? for help): w

Final checks completeAbout to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
Now gdisk will quit, it's ok.

Step 3: make hybrid GUID/MBR

root@debianvm:~# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerousIf you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbersseparated by spacesto be
added to the hybrid MBR, in sequence: 1 2 3
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n

Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default EF): EF02
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default EF): EF00
Set the bootable flag? (Y/N): n

Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default 07): 0700
Set the bootable flag? (Y/N): y

Recovery/transformation command (? for help): w

Final checks completeAbout to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
gdisk will quit (again) and it's ok.

Step 4: format the partitons

We have to format in FAT32 two of the three partitions, /dev/sdc2 and /dev/sdc3. Umount the partitions if mounted and then:

root@debianvm:~# mkfs.fat -F32 -n GRUB2EFI /dev/sdc2
mkfs.fat 3.0.27 (2014-11-12)

root@debianvm:~# mkfs.fat -F32 -n DATA /dev/sdc3
mkfs.fat 3.0.27 (2014-11-12)

Now the partitons are ready, we will mount /devsdc2 to /mnt/efi and /dev/sdc3 to /mnt/data.

root@debianvm:~# mkdir /mnt/efi
root@debianvm:~# mkdir /mnt/data
root@debianvm:~# mount /dev/sdc2 /mnt/efi/
root@debianvm:~# mount /dev/sdc3 /mnt/data/

Step 5: install grub

In this step we will install grub in EFI partition (mounted in /mnt/efi) and in MBR.

root@debianvm:~# grub-install --target=x86_64-efi --efi-directory=/mnt/efi --boot-directory=/mnt/data/boot --removable --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.

root@debianvm:~# grub-install --target=i386-pc --boot-directory=/mnt/data/boot --recheck /dev/sdc
Installing for i386-pc platform.
Installation finished. No error reported.

Step 6: create folders for ISOs

In /mnt/data we should now have only one directory, boot; let's create a directory for the ISOs.

root@debianvm:~# mkdir /mnt/data/iso
In /mnt/data we should now have
/mnt/data/
- - - - - - - /boot/
- - - - - - - - - - - /grub/
- - - - - - - /iso/
Now we add 2 folders in /iso, one for the other ISOs and one for Debian (this is a workaround for a known bug).
root@debianvm:~# mkdir /mnt/data/iso/debian
root@debianvm:~# mkdir /mnt/data/iso/others

Let's download some ISOs, here i will explain ho to configure grub to boot Debian XFCE amd64 Installer and Tails i386; here there are instructions for other distros.

Debian

Download:

And put these files into /mnt/data/debian/

Tails

Download the iso torrent. Then create a folder for tails and copy there the iso.

root@debianvm:~# mkdir /mnt/data/others/tails

In /mnt/data we should now have
/mnt/data/
- - - - - - - /boot/
- - - - - - - - - - - /grub/
- - - - - - - /iso/
- - - - - - - - - - - /debian/
- - - - - - - - - - - - - - - - debian-8.5.0-amd64-xfce-CD-1.iso
- - - - - - - - - - - - - - - - vmlinuz
- - - - - - - - - - - - - - - - initrd.gz
- - - - - - - - - - - /others/
- - - - - - - - - - - - - - - - /tails/
- - - - - - - - - - - - - - - - - - - - tails-i386-2.5.iso

Step 7: configure grub

Now we need to configure grub; grub at boot reads its config from a config file (grub.cfg). Create a grub.cfg file with the following content and copy it into /mnt/data/boot/grub/:

# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"

insmod exfat

# Setup video
if [ "$grub_platform" = "efi" ]
then
    insmod efi_gop
    insmod efi_uga
fi

if [ "$grub_platform" = "pc" ]
then
    insmod vbe
fi

# Setup font
insmod font

if loadfont ${prefix}/fonts/unicode.pf2
then
    insmod gfxterm
    set gfxmode=auto
    set gfxpayload=keep
    terminal_output gfxterm
fi

# Setup GRUB Screen
insmod jpeg
if background_image /boot/grub/grub_bg.jpg ; then
    set color_normal=white/black
    set color_highlight=white/green
else
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
fi

menuentry "Tails 2.5 i386" {
    set isofile='/iso/others/tails/tails-i386-2.5.iso'
    loopback loop $isofile
    linux (loop)/live/vmlinuz2 boot=live config findiso=${isofile} live-media=removable apparmor=1 security=apparmor nopersistent noprompt timezone=Etc/UTC block.events_dfl_poll_msecs=1000 noautologin module=Tails i2p
    initrd (loop)/live/initrd2.img
}

menuentry 'Debian 8.5.0 amd64 CD 1 XFCE' {
        set isofile='/iso/debian/debian-8.5.0-amd64-xfce-CD-1.iso'
        set initrdfile='/iso/debian/initrd.gz'
        loopback loop $isofile
        linux (loop)/install.amd/vmlinuz iso-scan/ask_second_pass=true
        initrd $initrdfile
}
menuentry "Reboot" {
        echo "System rebooting..."
        reboot
}

menuentry "Shutdown" {
        echo "System shutting down..."
        halt
}

It's done! If you want to customize grub's background copy a .jpg into /mnt/boot/grub/ and rename it grub_bg.jpg. Now unmount the USB drive and test it.
root@debianvm:~# umount /mnt/efi
root@debianvm:~# umount /mnt/data

Sources: arch linux wiki and many other sites.