How to boot into nothing ?
Posted: Mon Jun 29, 2020 7:38 am
I am following a course which involves creating a simple kernel(as the instructor calls it) which I can run on a VM(virtualbox) and debugging using gdb(running on another VM - ubuntu) over serial port. The video tutorial shows use of these two files:
command
the two files are copied to the temp/ directory .
There is also this command used :
The final result was: after placing this HardDisk(vhd) in a virtual machine, it should boot up to a screen like this :
some gdb commands that the instructor runs on the Ubuntu VM (after the above screen has come up):
further details:
The contents of menu.lst inside temp/boot/grub/:
contents of grub.cfg in temp/boot/grub/:
1. What are those floppy.img and memdisk files and how can I aquire or create them ?
2. What is this kernel which sticks on
3. How to boot into this nothing i.e just
I tried creating a blank floppy.img using and also aquired memdisk from syslinux but didn't work
The reason I am asking this here is that the instructor did not provide links to download those files. Please bear with me and suggest a way using which I can accomplish the above.
- memdisk
- floppy.img
Code: Select all
sudo mount temp/ /dev/sdb1/
the two files are copied to the temp/ directory .
There is also this command used :
Code: Select all
sudo grub-install --root-directory temp/ /dev/sdb1/
some gdb commands that the instructor runs on the Ubuntu VM (after the above screen has come up):
Code: Select all
set debug remote 1
set remotebaud 38400
target remote /dev/ttyS0
c
load lab.out
The contents of menu.lst inside temp/boot/grub/:
title GDB
root (hd0, 0)
####### The hdx part depends on the number of harddisks
####### you have. If you have one harddisk then the
####### memory stick would be hd1 and the entry will
####### be root (hd1, 0)
####### The second zero is actually dependent
####### on /dev/sda1. If it is sdaN the number will be
####### N-1
kernel /memdisk
initrd /floppy.img
contents of grub.cfg in temp/boot/grub/:
My questions:set default=0 #assumes (hd0) to be default partition
set timeout=10 #the system will autoboot in 10 seconds
menuentry "GDB boot"{
linux16 /memdisk
initrd16 /floppy.img
boot
}
1. What are those floppy.img and memdisk files and how can I aquire or create them ?
2. What is this kernel which sticks on
called ?booting...
3. How to boot into this nothing i.e just
? How to achieve this so that I can load programs to this machine using gdb on another machine as mentioned above?booting...
I tried creating a blank floppy.img using
Code: Select all
mkfs.msdos -C myfloppy.img 1440
The reason I am asking this here is that the instructor did not provide links to download those files. Please bear with me and suggest a way using which I can accomplish the above.