LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-28-2010, 05:06 PM   #1
Dufresne
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Rep: Reputation: 16
Question Block Device , fdisk


Hi!
I have a block device module. It works but not the way i need.
After i insert module , i have to create partitions with "fdisk" command.
What i need is , with inserting module , it shall also create partitions for it.
Without using "fdisk" command , it shall create partitions.
How can i do it ?
 
Old 05-28-2010, 05:40 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Probably need to re-think what you need - this belongs in user-space. Maybe use udev to fire off your partitioning code (even sfdisk with a script) when the device you create appears.
 
Old 05-28-2010, 06:35 PM   #3
Dufresne
LQ Newbie
 
Registered: Jul 2008
Posts: 23

Original Poster
Rep: Reputation: 16
I know it belongs user-space but it shall be a way to achieve it on kernel-space.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mtd driver as block device and char device Linux_Kid_ Linux - Kernel 1 12-27-2009 12:17 PM
Creating A New Device Node/Not A Valid Block Device indienick Debian 4 07-13-2007 02:07 PM
Difference between Block device and Character device quartslove Fedora 2 11-29-2006 08:50 PM
Block device /dev/sda3 is not a valid root device.. rincewind Linux - Hardware 7 06-09-2006 04:47 AM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration