Name: Hamza Afzal Roll no: 210948 Course: Operating systems Lab Assignment#01 Q#1: What is the boot sequence of Ubuntu? 1. Power on the computer and the BIOS (Basic Input/Output System) loads first. The BIOS is a firmware that initializes and tests the hardware components of the computer and checks for any errors. 2. The BIOS then looks for a bootable device, usually the hard drive, and checks the Master Boot Record (MBR) to find the boot loader. 3. Grub (Grand Unified Bootloader) is a boot loader that is installed by default on Ubuntu. It loads after the BIOS and provides a menu to select the operating system to boot into, among other options. 4. Once you select Ubuntu from the Grub menu, the kernel and the initial ramdisk (initrd) are loaded into memory. The kernel is the core of the operating system, and the initrd contains a temporary root file system necessary to load the kernel. 5. The kernel initializes the hardware components and loads the necessary drivers to access the hard drive and other peripherals. 6. The initrd is then unpacked into a temporary root file system, and the real root file system is mounted. 7. The system then switches to the real root file system, and the boot process continues with the init system (systemd) taking over. The init system starts services and daemons and runs scripts to set up the system. 8. Finally, the graphical user interface (GUI) is loaded, and the login screen is displayed. You can then log in and start using Ubuntu. That's the basic boot sequence for Ubuntu, and there may be variations depending on the system and any customizations made. Q#2: What is the boot sequence of Windows? 1. When the computer is turned on, the basic input/output system (BIOS) firmware is activated. This firmware checks the computer's hardware components and performs a Power-On Self-Test (POST) to ensure that they are functioning correctly. 2. Once the hardware has been checked, the BIOS searches for a boot device. The boot device can be a hard disk, solid-state drive (SSD), USB flash drive, CD/DVD-ROM drive, or network card, depending on the BIOS settings. 3. If the boot device is a hard disk, the BIOS loads the Master Boot Record (MBR) from the first sector of the disk. The MBR contains the boot loader program, which is responsible for loading the operating system. 4. The boot loader program reads the partition table in the MBR to determine which partition contains the active operating system. If the partition type is MBR, the boot loader continues to load the operating system from the selected partition. 5. If the partition type is GPT (GUID Partition Table), the boot loader program loads the EFI System Partition (ESP) instead of the MBR. The ESP contains the boot loader files for the operating system and is required for systems that use UEFI (Unified Extensible Firmware Interface) firmware instead of BIOS. 6. The boot loader program loads the Windows kernel (ntoskrnl.exe) and other necessary system files from the selected partition. 7. The kernel initializes the system and loads device drivers, services, and other components. It also launches the Windows Logon UI and presents the login screen. 8. Once the user logs in, the Windows Shell (explorer.exe) is launched, and the desktop is loaded. 9. The user can then start using the computer and launch applications. 10. Overall, the boot sequence of Windows involves several components, including the BIOS, MBR, GPT, boot loader, kernel, and system files. These components work together to load the operating system and prepare the system for use. That's it, these are the steps of the Windows boot sequence from turning power on to startup screen. Q#3: What are similarities and differences between booting process of ubuntu and Windows? Similarities: 1. Both Windows and Ubuntu follow a similar boot sequence from the point of turning on the power button. 2. Both operating systems start by running the basic input/output system (BIOS) or unified extensible firmware interface (UEFI) to perform system checks and load the boot loader. 3. Both systems use a boot loader to select the operating system and load it into memory. 4. Both systems use the Master Boot Record (MBR) or GUID Partition Table (GPT) to define the disk partition layout and the location of the boot loader. 5. Both systems use drivers to initialize hardware and load necessary system services. Differences: 1. Windows uses the Windows Boot Manager (BOOTMGR) as the primary bootloader, while Ubuntu uses the GNU Grand Unified Bootloader (GRUB). 2. The MBR is used as the primary partition table in Windows, while GPT is used as the primary partition table in Ubuntu. 3. The Windows boot sequence is more complex and involves multiple stages of booting, while Ubuntu follows a more straightforward process. 4. Windows uses the Windows Hardware Abstraction Layer (HAL) to abstract hardware, while Ubuntu uses the kernel modules. 5. Windows relies heavily on registry and system files, while Ubuntu uses configuration files that are easy to edit and customize. In summary, both Windows and Ubuntu have similarities in their boot sequence, but there are significant differences in the bootloader, partition table, and booting process. Windows is more complex, while Ubuntu is more straightforward, making it easier to customize and troubleshoot.