error: attempt to read or write outside of disk 'hd0'
Tofloor
poster avatar
alexthunder88
deepin
2018-03-28 23:49
Author
Edited by alexthunder88 at 2018-3-28 15:52

Hello!
I am new to Linux and desire to make Linux my main OS, for office, video editing and other media productions.

I tried to search that title in the forum but no results, so allow me please to post it here.

Dual booting:
I installed first Windows 7 for the sole purpose of playing League of Legends (LoL) in Philippine server inside the Garena Ph gaming platform.
(I gave up for now trying to find ways to use Linux on that game after 4 days of trying virtual machines, wine, etc. PlayOnLinux or Lutris can play LoL of other regions but if LoL is intertwined with Garena platform it is very problematic.)

When I installed Deepin after installing Windows, I have this error: "attempt to read or write outside of disk 'hd0' "
and then followed by a black screen showing kernel panic.

I can boot Windows with no problem but each boot with Deepin results to being unable to read/write outside of disk 'hd0' and results to kernel panic.

Help me boot to Deepin please...

My system:
Acer E14 E5-475G-50ST
Intel i5-7200U, 12GB DDR4 RAM
120 SSD Kingston (MBR partition)
Intel HD Graphics 620
Nvidia GeForce 940mx 2GB DDR5
BIOS 1.21, Legacy mode

sda1: 100MB Windows (Primary)
sda2: 45GB Windows (Primary)
sda3: 20GB Deepin / (Primary)
sda5: 25GB Deepin /home (Logical)
sda6: 4GB Deepin swap (Logical)
free: 20GB+ (over-provisioning for SSD health)
(I use an external HDD as my major file storage.)
Reply Favorite View the author
All Replies
alexthunder88
deepin
2018-03-31 22:03
#1
Edited by alexthunder88 at 2018-3-31 14:33

SOLVED!

Here's a recap of what had happened.
3 days ago,  my SSD looks like this:
sda
   sda1 -- 100mb windows boot
   sda2 -- 45gb windows system
   unallocated -- 60gb+
then, as I was installing deepin, I added a primary partition for deepin root:
sda
   sda1 -- 100mb windows boot
   sda2 -- 45gb windows system
   sda3 - 20gb deepin root /
   unallocated -- 40gb+
and then I added a logical partitions for /home and swap
sda
   sda1 -- 100mb windows boot
   sda2 -- 45gb windows system
   sda3 -- 20gb deepin root /
   sda5 -- 25gb deepin /home
   sda6 -- 4gb deepin swap   
   unallocated 15gb+
and of course, I was wondering why sd4 is not shown but I ignored it.

Installing deepin was successful. No problem with bootloader. I tried Windows 7 for my favorite game and it ran fine.
The problem occured when I chose Deepin to boot (see above post).
  error: attempt to read or write outside of disk 'hd0'
So I booted deepin recovery and open the GParted, and there, I noticed that sda5 and sda6 were under sda4 (see also picture sd5 inside sda4).
sda
  sda1 -- 100mb windows boot
  sda2 -- 45gb windows system
  sda3 -- 20gb deepin root /
  sda4
     sda5 --  25gb deepin /home
     sda6 -- 4gb swap
     unallocated -- 15gb+
  unallocated -- 4mb+
I just imagined last night that if sda4 is hidden and that sda5 and sda6 are inside it (sda4) then deepin may not find my /home (sda5) and swap (swap) because sda4 is a hidden partition. Hence,
  error: attempt to read or write outside of disk 'hd0'
So today, I re-installed deepin. In partitioning, I deleted everything except sda1 and sda2 of Windows.
This time, I started by adding a logical (instead of primary) partition. As expected, the label started not with sda3 but sda5. I installed root in sda5, made home in sda6, and swap in sda7.
Rebooted. I can boot to deepin!
I open GParted to see what took place in my SSD and it shows (see also attached picture 'deeepin in sda3 only'):
sda
  sda1 -- 100mb windows boot
  sda2 -- 45gb windows system
  sda3 -- extended partition (not primary; this is automatic when you make an additional logical parition)
     sda4 --this is actually hidden
     sda5 -- 20gb deepin root /
     sda6 --  25gb deepin /home
     sda7 -- 4gb swap
     unallocated -- 15gb+
  unallocated -- 4mb+
This means, that everything is in hd0. This solves my problem in dual booting.
I do not yet understand the mystery but my problem is solved.

For new users like me who are also dual booting, maybe, I should share with you to make sure your root, home and swap partitions are inside a visible partition. MBR/Legacy can only have 4 primary partitions but it is okay to have your linux partitions in an extended (non-primary) parition. Bootloader will do the job of finding your boot files.




Reply View the author