Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. Disk /dev/sda: 489.1 GiB, 525112713216 bytes, 1025610768 sectors
  2. Units: sectors of 1 * 512 = 512 bytes
  3. Sector size (logical/physical): 512 bytes / 512 bytes
  4. I/O size (minimum/optimal): 512 bytes / 512 bytes
  5. Disklabel type: gpt
  6. Disk identifier: xxxxxxxxxxxxxxxxxxxxxxxx
  7.  
  8. Device Start End Sectors Size Type
  9. /dev/sda1 2048 1050623 1048576 512M EFI System
  10. /dev/sda2 1050624 1025610734 1024560111 488.6G Linux filesystem
  11.  
  12. # Begin /boot/grub/grub.cfg
  13. set default=0
  14. set timeout=5
  15.  
  16. insmod gzio
  17. insmod part_gpt
  18. insmod ext2
  19. set root=(hd0, gpt2)
  20. # hd[x] is the drive of the LFS partion and gpt[y] is the partition
  21.  
  22. insmod efi_gop
  23. insmod efi_uga
  24. insmod font
  25. if loadfont /grub/unicode.pf2; then
  26. loadfont /grub/unicode.pf2
  27. set gfxmode=auto
  28. insmod gfxterm
  29. set gfxpayload=keep
  30. terminal_output gfxterm
  31. fi
  32.  
  33. menuentry "GNU/Linux, Linux 5.2.1-lfs-20190714-systemd" {
  34. linux /boot/vmlinuz-5.2.1-lfs-20190714-systemd root=/dev/sda2 ro console=tty0 console=ttyS0
  35. initrd /boot/initramfs.cpio.gz
  36. }
  37.  
  38. #!/bin/busybox sh
  39.  
  40. # Mount the /proc and /sys filesystems.
  41. mount -t proc none /proc
  42. mount -t sysfs none /sys
  43.  
  44. # Do your stuff here.
  45. echo "This script just mounts and boots the rootfs, nothing else!"
  46.  
  47. # Mount the root filesystem.
  48. mount -o ro /dev/sda2 /mnt/root
  49.  
  50. # Clean up.
  51. umount /proc
  52. umount /sys
  53.  
  54. #exec /bin/sh
  55. #Boot the real thing.
  56. exec switch_root /mnt/root /sbin/init
  57.  
  58. sudo ./qemu-system-x86_64
  59. --bios /src/edk2/Build/OvmfX64/DEBUG_GCC5/FV/OVMF.fd
  60. -nographic -net none
  61. -drive file=/dev/sda,index=0,media=disk,format=raw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement