Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Removed grub bios partition; Partition table gone
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
tantrum
n00b
n00b


Joined: 01 Jan 2014
Posts: 5

PostPosted: Thu Jan 02, 2014 1:52 am    Post subject: Removed grub bios partition; Partition table gone Reply with quote

Ok, I accidentally removed the Grub bios boot partition, after I thought that it was the first and only partition on the second harddisk I have.

Thinking that I could just fix it by remaking the partition, I added a partition 1, with boundaries 1 - 3 MB as set out in the Gentoo installation guide (and as I did before, and installed Grub to /dev/sda with grub2-mkconfig.

But now I can't seem to be able to get the partition table anymore.

It says "Inappropriate ioctl for device"

I'm still booted in the system right now.

It must be possible to solve this without having to install everything, but how?
Back to top
View user's profile Send private message
fau
n00b
n00b


Joined: 01 Apr 2010
Posts: 74

PostPosted: Thu Jan 02, 2014 3:51 pm    Post subject: Reply with quote

Iirc you need to re-read partition table (or reboot but this can be risky). See "man partprobe".
Also have you tried parted rescue command?
Back to top
View user's profile Send private message
tantrum
n00b
n00b


Joined: 01 Jan 2014
Posts: 5

PostPosted: Thu Jan 02, 2014 5:40 pm    Post subject: Reply with quote

Hmm, I remade the partition with parted. As far as i know, parted writes partition directly to the partition table when you make them.

I don't remember exactly, but I think that I checked with the 'p' command in parted after remaking the partition, and then it showed /dev/sda1 in the list. Only after I quit parted and started it again, it gave me the ioctl error.

I tried different tools by which you can detect already existing partitions (gpart, partprobe, testdisk), in order to mannually remake the partition table. I also went into parted rescue mode. They either give a 4.7 kB /dev/sda device or give a 'ioctl' error.

My theory: if exactly the same partition, on exactly the same boundaries, with exactly the same filesystem (or none, in the case of the bios_grub partition) is written to the table, as the one which was removed before, then I could just reboot the pc, and it would boot as if nothing had happened. New or old partition table: they would all refer to the same...
Back to top
View user's profile Send private message
tantrum
n00b
n00b


Joined: 01 Jan 2014
Posts: 5

PostPosted: Sat Jan 04, 2014 2:00 am    Post subject: Reply with quote

So the computer was rebooted two times in my absence, and no error was reported :D

Uhm... theory proven?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum