SHARE
TWEET

Untitled

a guest Nov 15th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1. Vytvoreni partitions na flashce:
  2.  
  3. Device     Start      End  Sectors  Size Type
  4. /dev/sda1   2048    43007    40960   20M EFI System
  5. /dev/sda2  43008 15646686 15603679  7.5G Linux filesystem
  6.  
  7. 2. naformatovat na vfat a napr. ext3
  8.  
  9. /dev/sda1      vfat         20422     8668     11754  43% /mnt/sda1
  10. /dev/sda2      ext3       7548292  2627804   4530400  37% /mnt/sda2
  11.  
  12. 3. namountovat obe partitions do /mnt/sdaX a
  13.  
  14. 4. vytvorit efi bootloader
  15.  
  16. grub-install --removable --no-uefi-secure-boot --target=x86_64-efi --efi-directory=/mnt/sda1/ --boot-directory=/mnt/sda2/boot --bootloader-id=grub --recheck /dev/sda
  17.  
  18. Struktura na sda1 by pak mela vypadat takto:
  19.  
  20. root@ubilinux:/home/ubilinux# tree /mnt/sda1
  21. /mnt/sda1
  22. ├── boot
  23. │   └── grub
  24. │       ├── fonts
  25. │       │   └── unicode.pf2
  26. │       ├── grubenv
  27. │       ├── locale
  28. │       │   ├── ast.mo
  29. │       │   ├── ....
  30. │       └── x86_64-efi
  31. │           ├── acpi.mod
  32. │           ├── ....
  33. └── EFI
  34.     └── BOOT
  35.         └── BOOTX64.EFI
  36.  
  37. 6. Zkopirovat cely filesystem noveho systemu vcetne jadra do /mnt/sda2.
  38.  
  39. 5. vytvorit grub.cfg
  40.  
  41. mount -o bind /dev /mnt/sda2/dev
  42. mount -o bind /dev/pts /mnt/sda2/dev/pts
  43. mount -o bind /proc /mnt/sda2/proc
  44. mount -o bind /run /mnt/sda2/run
  45. mount -o bind /sys /mnt/sda2/sys
  46.  
  47. chroot /mnt/sda2
  48.  
  49. grub-mkconfig -o /tmp/grub.cfg
  50.  
  51. exit  # ukonceni chrootu
  52.  
  53. 6. Nakopirovat vygenerovany /mnt/sda2/tmp/grub.cfg do /mnt/sda1/boot/grub/grub.cfg
  54.  
  55. 7. upravit fstab noveho systemu
  56.  
  57. # /etc/fstab: static file system information.
  58. #
  59. # Use 'blkid' to print the universally unique identifier for a
  60. # device; this may be used with UUID= as a more robust way to name devices
  61. # that works even if disks are added and removed. See fstab(5).
  62. #
  63. # <file system> <mount point>   <type>  <options>       <dump>  <pass>
  64. # / was on /dev/sda6 during installation
  65. /dev/sda2  /               ext4    errors=remount-ro 0       1
  66.  
  67. 8. vse unmountovat a vyzkouset boot z flash.
  68.  
  69. Odkazy
  70.  
  71. https://nixaid.com/creating-uefi-bootable-usb-flash-drive-with-several-linux-distributions/ - Creating UEFI bootable USB flash drive with several Linux distributions
  72. https://debian-administration.org/users/dkg/weblog/112 - Bootable grub USB stick (EFI and BIOS for Intel) - bootovani ruznych architektur 64-bit (x86_64) and 32-bit (ia32
  73. https://www.logilab.org/blogentry/6546148 - Installing Debian Jessie on a "pure UEFI" system
  74. http://willhaley.com/blog/create-a-custom-debian-stretch-live-environment-ubuntu-17-zesty/ - custom squashfs casper live usb/cd, bez efi
  75. http://wiki.ubuntu.cz/vytvo%C5%99en%C3%AD_vlastn%C3%ADho_livecd - Vytvoření vlastního LiveCD
  76. https://www.milan-knizek.net/cms/ubuntu-na-usb-flash-disku/
RAW Paste Data
Top