dual-boot interview questions
Top dual-boot frequently asked interview questions
I think I might have a virus on my windows partition and I want to scan it from Ubuntu. Is this possible? I would like a program that is free.
clamAV
I tried clamAV but I couldn't find a setting for scaning my other partition that I have windows on, it scaned my Ubuntu disk and that was fine.
Antivirus Within Windows
I can't use my Windows partition since the virus make my laptop freeze every time I log in. And I don't want it to spread or make more damage than it might have done already.
Source: (StackOverflow)
I'm absolutely new to Linux. I have been using Windows for all my life, but I have read about Ubuntu (and Linux in general) and I think I'll like it, so I wanted to know how to install Ubuntu on my PC with a Pre-Installed Windows 8 or later on it.
Can I do it with Wubi or through the Live USB/DVD?
What steps do I need to take to correctly install Ubuntu?
Source: (StackOverflow)
I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.
How can I get Ubuntu back?
Source: (StackOverflow)
Dual boot system Windows XP Pro and Ubuntu 12.04.
I have the bios set for the correct time and Ubuntu set for US Eastern time. Ubuntu will boot up and the time will be off by -4 hours. If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.
This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.
Source: (StackOverflow)
In Ubuntu 12.04 (or above), how do I set the GRUB time and the default OS (that I see at boot time) as I'm dual-booting Windows (7/8) and Ubuntu (12.04 or above)?
Source: (StackOverflow)
I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this?
I can't lose my Ubuntu files, and I'm afraid that I might break GRUB.
Source: (StackOverflow)
I have two NTFS partitions, and I don't want to mount them everytime I start Ubuntu.
- How can I do this?
- Is there a tool or a code to use?
- If so, is it safe to automount? specially when they are being used by another OS?
Source: (StackOverflow)
Grub2 - Community Ubuntu Documentation says the following:
Saving an OS can be achieved by running sudo grub-set-default if
DEFAULT=saved is set in /etc/default/grub. It may also be saved if
GRUB_SAVEDEFAULT=true is also set in /etc/default/grub. In this case,
the default OS remains until a new OS is manually selected from the
GRUB 2 menu or the grub-set-default command is executed.
I put the lines DEFAULT=saved
AND GRUB_SAVEDEFAULT=true
in /etc/default/grub
, and ran sudo grub-set-default
. Here is the output:
$ sudo grub-set-default
entry not specified.
Usage: grub-set-default [OPTION] entry
Set the default boot entry for GRUB.
-h, --help print this message and exit
-v, --version print the version information and exit
--boot-directory=DIR expect GRUB images under the directory DIR/grub
instead of the /boot/grub directory
ENTRY is a number or a menu item title.
Report bugs to <bug-grub@gnu.org>.
Am I not following the documentation correctly? What's the correct way to do this?
Source: (StackOverflow)
I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.
Could someone please provide clear instructions?
Source: (StackOverflow)
I've just upgraded to Windows 10 from Windows 8.1 on my partitioned laptop that has Ubuntu 14.04 installed. Grub no longer appeared on boot so I ran boot-repair from an Ubuntu liveUSB. This didn't seem to have any effect. I've checked and secure boot is still disabled.
Log from boot-repair: http://paste.ubuntu.com/11972534/
So what's next?
Update: I've attempted to use chroot to update grub from my Ubuntu partition. update-grub runs successfully finding both linux and windows boot manager but the process still doesn't have any effect. grub-install complains that it cannot find EFI directory (but I have mounted everything correctly).
Update2: Just discovered that running efibootmgr after chroot into ubuntu shows ubuntu as not being in the boot order at all. I manually changed the order and rebooted to discover that the bootorder was reset. I run in windows: bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi
But this has no effect either even after reporting 'Operation Successful'.
Source: (StackOverflow)
I have a multiboot system set up. The system has three drives. Multiboot is configured with Windows XP, Windows 7, and Ubuntu - all on the first drive. I had a lot of unpartitioned space left on the drive and was reserving it for adding other OSes and for storing files there in the future.
One day I went ahead and downloaded Partition Wizard and created a logical NTFS partition from within Windows 7, still some unpartitioned space left over. Everything worked fine, until I rebooted the computer a few days later.
Now I'm getting:
error: unknown filesystem.
grub rescue>
First of all I was surprised not to find any kind of help command, by trying:
help
, ?
, man
, --help
, -h
, bash
, cmd
, etc.
Now I'm stuck with non-bootable system. I have started researching the issue and finding that people usually recommend to boot to a Live CD and fix the issue from there. Is there a way to fix this issue from within grub rescue without the need for Live CD?
UPDATE
By following the steps from persist commands typed to grub rescue, I was able to boot to initramfs prompt. But not anywhere further than that.
So far from reading the manual on grub rescue, I was able to see my drives and partitions using ls
command. For the first hard drive I see the following:
(hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)
I now know that (hd0,msdos6) contains Linux on it, since ls (hd0,msdos6)/
lists directories. Others will give "error: unknown filesystem."
UPDATE 2
After the following commands I am now getting to the boot menu and can boot into Windows 7 and Ubuntu, but upon reboot I have to repeat these steps.
ls
ls (hd0,msdos6)/
set root=(hd0,msdos6)
ls /
set prefix=(hd0,msdos6)/boot/grub
insmod /boot/grub/linux.mod
normal
UPDATE 3
Thanks Shashank Singh, with your instructions I have simplified my steps to the following. I have learned from you that I can replace msdos6 with just a 6 and that I can just do insmod normal
instead of insmod /boot/grub/linux.mod
. Now I just need to figure out how to save this settings from within grub itself, without booting into any OS.
set root=(hd0,6)
set prefix=(hd0,6)/boot/grub
insmod normal
normal
UPDATE 4
Well, it seems like it is a requirement to boot into Linux. After booting into Ubuntu I have performed the following steps described in the manual:
sudo update-grub
sudo grub-install /dev/sda
This did not resolve the issue. I still get the grub rescue prompt. What do I need to do to permanently fix it?
I have also learned that drive numbers as in hd0 need to be translated to drive letters as in /dev/sda for some commands. hd1 would be sdb, hd2 would be sdc, and so on. Partitions listed in grub as (hd0,msdos6) would be translated to /dev/sda6.
UPDATE 5
I could not figure out why the following did not fix grub:
sudo update-grub
sudo grub-install /dev/sda
So I downloaded boot-repair based on an answer from https://help.ubuntu.com/community/Boot-Repair post. That seemed to do the trick after I picked the "Recommended Repair (repairs most frequent problems)" option.
Source: (StackOverflow)
I have an Inspiron 3521 that came pre-installed with Windows 8.1. I decided to dual-boot Windows and Ubuntu, and it was working good. But, when using Ubuntu, I heard a lot of noise from my laptop while on using Windows, it was almost silent. Also, after about 2-3 weeks of using Ubuntu, I was unable to use Windows as it had become very slow. Now I am getting my HDD replaced as it is failing. So, is installing Ubuntu and using it destroying my HDD? Because before installing it, Windows was running well but after it, it has become almost unusable. So, should I install Ubuntu on my new disk or should I refrain from it. Please help because I like Ubuntu more than Windows, but I can't risk buying new HDDs over and over again. Also, completely removing Windows is not a choice.
Please let me know if I should install Ubuntu alongside?
Output of : smartctl -a /dev/sda
:
=== START OF INFORMATION SECTION ===
Device Model: ST500LT012-1DG142
Serial Number: W3P8Y9MR
LU WWN Device Id: 5 000c50 07c643db0
Firmware Version: 0001SDM1
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Tue Feb 17 15:58:15 2015 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 97) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x1035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 117 080 006 Pre-fail Always - 158207928
3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 414
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 16
7 Seek_Error_Rate 0x000f 064 060 030 Pre-fail Always - 38678857862
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 772 (87 233 0)
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 384
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 1465
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 0
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 059 052 045 Old_age Always - 41 (Min/Max 29/43)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 195
192 Power-Off_Retract_Count 0x0032 100 100 000 Old_age Always - 14
193 Load_Cycle_Count 0x0032 096 096 000 Old_age Always - 8566
194 Temperature_Celsius 0x0022 041 048 000 Old_age Always - 41 (0 17 0 0 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 8
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 8
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
240 Head_Flying_Hours 0x0000 100 100 000 Old_age Offline - 276333900858102
241 Total_LBAs_Written 0x0000 100 253 000 Old_age Offline - 2960885917
242 Total_LBAs_Read 0x0000 100 253 000 Old_age Offline - 5374462826
254 Free_Fall_Sensor 0x0032 100 100 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 2175 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 2175 occurred at disk power-on lifetime: 758 hours (31 days + 14 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 20 19 56 00 Error: UNC at LBA = 0x00561920 = 5642528
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 00 ff ff ff 4f 00 00:15:34.369 READ FPDMA QUEUED
61 00 68 ff ff ff 4f 00 00:15:34.369 WRITE FPDMA QUEUED
61 00 10 ff ff ff 4f 00 00:15:34.369 WRITE FPDMA QUEUED
60 00 08 20 19 56 40 00 00:15:34.368 READ FPDMA QUEUED
60 00 40 ff ff ff 4f 00 00:15:34.368 READ FPDMA QUEUED
Error 2174 occurred at disk power-on lifetime: 758 hours (31 days + 14 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 20 19 56 00 Error: UNC at LBA = 0x00561920 = 5642528
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 08 20 19 56 40 00 00:15:31.814 READ FPDMA QUEUED
60 00 20 ff ff ff 4f 00 00:15:31.814 READ FPDMA QUEUED
61 00 08 ff ff ff 4f 00 00:15:31.813 WRITE FPDMA QUEUED
ea 00 00 00 00 00 a0 00 00:15:31.813 FLUSH CACHE EXT
27 00 00 00 00 00 e0 00 00:15:31.787 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
Error 2173 occurred at disk power-on lifetime: 758 hours (31 days + 14 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 20 19 56 00 Error: WP at LBA = 0x00561920 = 5642528
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
61 00 10 ff ff ff 4f 00 00:15:29.177 WRITE FPDMA QUEUED
61 00 08 ff ff ff 4f 00 00:15:29.177 WRITE FPDMA QUEUED
61 00 08 ff ff ff 4f 00 00:15:29.177 WRITE FPDMA QUEUED
60 00 08 20 19 56 40 00 00:15:29.176 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 00:15:29.176 READ FPDMA QUEUED
Error 2172 occurred at disk power-on lifetime: 758 hours (31 days + 14 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 20 19 56 00 Error: WP at LBA = 0x00561920 = 5642528
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
61 00 08 ff ff ff 4f 00 00:15:26.514 WRITE FPDMA QUEUED
61 00 18 ff ff ff 4f 00 00:15:26.513 WRITE FPDMA QUEUED
60 00 08 20 19 56 40 00 00:15:26.513 READ FPDMA QUEUED
60 00 40 ff ff ff 4f 00 00:15:26.513 READ FPDMA QUEUED
61 00 08 ff ff ff 4f 00 00:15:26.513 WRITE FPDMA QUEUED
Error 2171 occurred at disk power-on lifetime: 758 hours (31 days + 14 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 20 19 56 00 Error: UNC at LBA = 0x00561920 = 5642528
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
60 00 40 ff ff ff 4f 00 00:15:18.647 READ FPDMA QUEUED
60 00 20 ff ff ff 4f 00 00:15:18.641 READ FPDMA QUEUED
60 00 08 ff ff ff 4f 00 00:15:18.629 READ FPDMA QUEUED
60 00 20 ff ff ff 4f 00 00:15:18.619 READ FPDMA QUEUED
60 00 20 ff ff ff 4f 00 00:15:18.607 READ FPDMA QUEUED
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 90% 760 5642528
# 2 Short offline Completed: read failure 90% 759 5642528
# 3 Short offline Completed: read failure 90% 759 5642528
# 4 Short offline Completed: read failure 90% 758 5642528
# 5 Short offline Completed: read failure 90% 756 5642528
# 6 Short offline Completed: read failure 90% 752 5642528
# 7 Extended offline Completed: read failure 90% 752 5642528
# 8 Short offline Completed: read failure 90% 752 5642528
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Note: The above test is from the old HDD, which I think was destroyed by coincidence while running Ubuntu.
Output of sudo parted --list
:
Model: ATA ST500LT012-1DG14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB ntfs Basic data partition hidden, diag
2 316MB 419MB 104MB fat32 EFI system partition boot
3 419MB 554MB 134MB Microsoft reserved partition msftres
4 554MB 237GB 236GB ntfs Basic data partition msftdata
10 237GB 289GB 52.4GB ext4
7 289GB 293GB 4096MB linux-swap(v1)
8 293GB 314GB 20.5GB ext4
9 314GB 342GB 27.9GB ext4
5 342GB 395GB 53.7GB ntfs Basic data partition msftdata
6 395GB 500GB 105GB ntfs Basic data partition msftdata
Source: (StackOverflow)
I use Ubuntu 11.10 and Windows7 dual boot with Ubuntu as my primary OS.
Every time I need to access a document I need to mount the respective drive, though this is not at all tiresome, still, is there any way that drives becomes automatically mounted when I login?
Source: (StackOverflow)
I was dual-booting Windows 7 and Linux Ubuntu on my desktop, and today is the day they gave out free Windows 10 upgrades. How exciting! I got the update, and it was installing, and I left to go take a 30 minute nap. However, when I came back to my computer, it led me to the grub rescue prompt.
error: no such partition.
Entering rescue mode...
grub rescue>
I get the following when I type ls
:
grub rescue> ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
After a quick look through of people who encountered the grub rescue prompt, I typed set
and got the following
grub rescue> set
cmdpath=(hd0)
prefix=(hd0,msdos6)/boot/grub
root=hd0,msdos6
I was still kind of lost after finding that certain commands like normal
didn't work, and then I found a video tutorial where you boot from a Linux image cd and run some commands on the terminal. Luckily, I had my CD with me, and booted from there. When I typed sudo fdisk -l
into the terminal however, this is what I got:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc03ede74
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 1547022335 773407744 7 HPFS/NTFS/exFAT
/dev/sda3 1547022336 1547943935 460800 27 Hidden NTFS WinRE
/dev/sda4 1547945982 1953521663 202787841 f W95 Ext'd (LBA)
/dev/sda5 1915731968 1953521663 18894848 7 HPFS/NTFS/exFAT
Says here none of my devices has the Linux system in them! And I couldn't follow the video tutorial any more than that...
I teased my brain a little and determined that sda2 contained my Windows system (since I remember my C: drive has around 700-ish GB of space). After thinking a little bit more, I remember assigning around 200-ish GB of my hard disk space to something that's Ubuntu related when installing Ubuntu. I don't exactly remember which, but I think it was basically Ubuntu "hard disk space", and it didn't have any boot files in them. I assigned two other things for linux, but they were very small in size (not breaking the 1 GB mark yet).
So, can anyone here help me out get my upgrade back on track? I won't mind if I end up having to completely remove the partitions that have Linux in them.
Source: (StackOverflow)
I stopped Dualbooting and I dont want to have to choose the OS anymore and just have it load Ubuntu like normal like before?
Any help is appreciated.
Source: (StackOverflow)