LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Re-read Partition Table (https://www.linuxquestions.org/questions/linux-general-1/re-read-partition-table-16586/)

sourceman 03-19-2002 05:02 AM

Re-read Partition Table
 
If you run fdisk, change something, and then exit fdisk, is prints something like "calling sysctl to re-read partition table".

How can I force a re-read by calling /sbin/sysctl, instead of using fdisk?

acid_kewpie 03-19-2002 05:11 AM

why would you want to??

sourceman 03-19-2002 05:26 AM

It's a long story... basically, i'm modifying a bunch of partitions, checking them, maybe formatting them, whatever.
The point is, it's not updating until I reset. I know sysctl can save me this reset.

Mik 03-19-2002 10:13 AM

man sysctl will get you a lot further. Basically you can modify lots of things with sysctl. I don't know which variables fdisk modifies. But with sysctl -a you get a list of all the available variables you can modify.
Last time I physically changed my partition table I remember getting a message from fdisk to reboot before it would update the changes. But maybe that was an older version of fdisk.

uplink 06-29-2007 08:22 AM

Since this post appears second on Google and searching for "Reread partition table" and the replies are totally off (at least today they are), I feel obligated to post an answer:

/sbin/blockdev --rereadpt /dev/hda

pixellany 06-29-2007 08:42 AM

Quote:

Originally Posted by uplink
Since this post appears second on Google and searching for "Reread partition table" and the replies are totally off (at least today they are), I feel obligated to post an answer:

/sbin/blockdev --rereadpt /dev/hda

In addition to your good deed, you get the prize for unearthing the oldest thread....;)

uplink 06-30-2007 03:59 AM

Quote:

Originally Posted by pixellany
In addition to your good deed, you get the prize for unearthing the oldest thread....;)

This is offtopic, but the thread did show up as second on Google (so I'm not unearthing it, because it's not dead an burried, but walking the streets just fine), and I'm pretty damn mad about threads that show up on top but their contents is totally useless. So far, I haven't encountered a better idea except "unearthing". Let's stop the trolling here please.

Hottbuttaz 08-01-2007 08:07 AM

Quote:

Originally Posted by uplink
Let's stop the trolling here please.

Dear uplink,
In internet forum vernacular, a winky yellow smiley face is used to denote a playful comment or joke. In accusing pixellany of trolling you are actually the one trolling by further derailing the topic and inviting him to defend himself against an unjust accusation. :tisk: :tisk: :tisk:

pixellany 08-01-2007 08:41 AM

And I would never know that I had been unjustly accused unless Hottbuttaz had lept to my defense!!!!!
Nothing here matches the definition of "trolling" as commonly used. Pointless levity--perhaps.....
We'll watch for uplink's sense of humor to improve after experiencing the full range of silliness that appears in LQ.

uplink 08-02-2007 04:55 PM

Quote:

Originally Posted by Hottbuttaz
Dear uplink,
In internet forum vernacular, a winky yellow smiley face is used to denote a playful comment or joke. In accusing pixellany of trolling you are actually the one trolling by further derailing the topic and inviting him to defend himself against an unjust accusation. :tisk: :tisk: :tisk:

Next time I'll use quotes where appropriate. This thread is screwed by now though... Pity. Anyone want to delete everything after the real answer? And lock the thread afterwards :)

olo 01-10-2008 04:29 AM

Don't lock the thread yet!

There's more than one way to re-read the partition table. If you have parted installed, you can use this command:

Quote:

partprobe

olo 01-10-2008 04:31 AM

If you have sfdisk you can also do this:

Quote:

sfdisk -R /dev/DISK_DEVICE_TO_REREAD_FROM


All times are GMT -5. The time now is 06:03 AM.