Software :: Command - Use To Partition A Device Without Entering Any Menus?
Dec 2, 2010
Does anyone know of a command I can use to partition a device without entering any menus? I want to run the command with all config parameters and flags like disk size, device name, partition number and type, etc and it should just create the required partition.
I am liking Opensuse, but have a problem when using my NFTS partitions (dual boot so docs on this partition). I always have to enter a password which annoys me to no end. Most distributions do this, in fact only for Mandriva have I been able to find out how to do this without a password. Is it possible with Opensuse?
I've installed Karmic after having used Jaunty in the past and it's working great, but I have a couple of security questions...
I opened the Disc Utility (Palimpsest) under System>Administration and was amazed that it looks like it will let me delete partitions on my hard drive, and without even asking for a password. This seems like an enormous security oversight, what am I missing here? Is there a bug filed for this?
Also related, why does Ubuntu allow a user to disable startup applications without requiring a password?
I'm trying to move the /var/www dir to another partition (another hard drive even, though I doubt that makes a difference) because my file system partition is rather small. But when I do I get "403 -forbidden" and in the logs "Permission denied: /home/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable". If I move it anywhere within the partition (and adjust the conf) I don't get this problem. Using Ubuntu 10.04 Desktop x64. I haven't had any problems with this in earlier Ubuntu-versions.
I am very much new to Linux programming. My question is Is there any way to read UUID of a device or partition in linux programatically. Is there any c/c++ API for user-space applications. I found some commands "sudo vol_id --uuid /dev/sda1", "sudo blkid", "ls -l /dev/disk/by-uuid/". But all are commands which we need to run in terminal. But I need to achieve this from a c/c++ program. (FYI: I need to read uuid of root filesystem ("/") where Linux has been installed.)
I have just bought 4 1TB drives and set up a Software Raid level 5. Using Disk Utility tool I have created a GPT partition table and now when I want to create a partition, I get:
Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/md0, start=0, size=3000610848768, type= Entering MS-DOS parser (offset=0, size=3000610848768) MSDOS_MAGIC found found partition type 0xee => protective MBR for GPT
[Code].....
it does say nothing about creating an partition on the /dev/md0, although Gnome Disk Utility allows to do that - if I just run mkfs.xsf /dev/md0 - it works fine, yet Disk Utility tells me that disk has not been partitioned, see image:
I'm trying to move the /var/www dir to another partition (another hard drive even, though I doubt that makes a difference) because my file system partition is rather small. But when I do I get "403 -forbidden" and in the logs "Permission denied: /home/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable". If I move it anywhere within the partition (and adjust the conf) I don't get this problem.
Using Ubuntu 10.04 Desktop x64. I haven't had any problems with this in earlier Ubuntu-versions.
I am finally, and happily ditching Windows IIS, SQL Server, and ASP in favor of LAMP. Not only will I save a bunch of money on operating systems but I've found php and MySQL development to be much faster than their Microsoft counterparts.Currently I have two W2008 and two Ubuntu servers running and doing virtually parallel tasks. I want to can the W2008 machines but I am not 100% sure of my Ubuntu mirrors.Everything seems to be working fine. I've copied tons of data back and forth as a primitive test but sometimes things work fine for all the wrong reasons. Here's where I get confused.
Question 1:Do I need to partition the RAID device (MD0) and then format it?From my experience this is necessary to get the device to mount.
Question 2:In this case was it also necessary to format the individual drive partitions?
Question 3:If I do a daily cat /proc/mdstat is this all I need to do to check the drive status.
Question 4:Is there any other check I can do to assure that the mirrors are created, mounted, and operating correctly?
After 2-3 partition an extended partition automatically created in which I am not able to create specified capacity i.e., say I want 150g of /photos partition, the /videos partition is automatically reduced and a free space at the end appears. Some free space is always there which i am not able to understand. Nevertheless i clicked to create, but I get an error viz. 'device not created'.
I am very much new to Linux programming. My question is Is there any way to read UUID of a device or partition in linux programatically. Is there any c/c++ API for user-space applications. I found some commands "sudo vol_id --uuid /dev/sda1", "sudo blkid", "ls -l /dev/disk/by-uuid/". But all are commands which we need to run in terminal. But i need to achieve this from a c/c++ program. Can some one help me in this problem.(FYI: I need to read uuid of root filesystem ("/") where Linux has been installed.)
I updated quite a lot - kernel, selinux policies, initscripts, glibc and a lot more - and after reboot one filesystem does not mount. It says:Command failed: Can not access device... and asks for password. This is: RAID -> LVM (mirrored) -> LUKS -> ext3. Similar filesystem (raid->lvm(not mirrored)->luks->ext3) mounts fine. Mounting the problematic system by hand works fine. During boot, the lvm blockdev is named by UUID in crypttab, and the name used in fstab.
Of course I removed it from fstab to boot now. I tried downgrading initscripts so far, will try others. What I also noticed is that the emergency shell (bash) complains about something, I'd need to write it down next time I reboot; also "lvs" fails when / is ro, but maybe that's normal, dunno.Googling for the error message brought something about cryptsetup, but I didn't upgrade it (there is no upgrade available), and all I gather from it is that the error message might really mean something else, like device is already mapped.
It is probably something related to lvm mirrors, maybe also to luks, though the only related package in the list is the kernel, maybe the module-init-tools. SELinux seems not to be the cause, booting with permissive has the same problem. What I wrote above, leads me to thinking that luks is trying to set up lvm mirrors in parallel as they have the same uuid, but a) later during boot the mapping name is not there b) I have no idea what reads crypttab
When installing I am selecting the manual partitioning scheme( I have arch on another partition). After I have selected my custom partitions and their mount points it starts the installation but almost immediately it gives the error message that it cannot create a partition on the specified one, as it is used by the OS. I have also tried to create partitions through gparted in the live session but to no avail. I am sure that no partitions are mounted or in use by the system, I have checked this using the mount and fuser commands. I also tried the oem installation but the result the same.
I have a HP Pavilion dm4-1177 (640GB HDD, 6GB RAM, Windows 7 Home Premium 64 bit os, Intel core i5 2,4GHz).I tried to install Ubuntu 11.04 (both 32 bit and 64 bit) using the wubi, on a separate partition I keptexclusively for linux (10GB). During the mid-way of installation, it said:
An error ocurred: Error executing command >>command=C:Windowssysnativecdedit.exe/set{c644fa11-0e.......................} device partition=H:
I have installed vmware in windows server 2003 enterprise edition. When I installed I changed the default installation folder from c: drive to i: drive, as I do not have space in c: drive. After I captured red hat linux cd in vmware and reached partitioning section and continued I got a message like "an error has occured no valid devices were find on which to create new file systems, please check the hardware for the cause of the problem". The machine is IBM server....
First, excuse me for my bad english I want to connect a bluetooth device with the command rfcomm. In a terminal, I put the command :
Code: rfcomm connect 0 00:80:98:E4:07:53 And the system answers : Code: Connected /dev/rfcomm0 to 00:80:98:E4:07:53 on channel 1 Press CTRL-C for hangup
On fedora 10, or 11, I can use this command with all users. On fedora 12, only the root user can connect and use this device. Other users have the message :
Code: Can't open RFCOMM device: Permission denied What can I do to resolve this problem?
I have a program which mounts /dev/sdb1 for which I lack the source code. This device does not exist on my RedHat 9 system and I want to create /dev/sdb1 such that it's an alias for /dev/hdb1 Can I do this? with MAKEDEV?
I need to have an alias which will allow it to mount, not create a symbolic link to an already mounted directory. i.e. 'mount /dev/sdb1 /mnt/harddrive' should actually mount /dev/hdb1
I'm trying to format a device into XFS filesystem using mkfs command. Suppose I have a /dev/sda1 device with 4096 block and I want to format the whole thing, how can I execute the command? I keep getting various errors while executing it.
So I cant seem to be able to install fedora 15. I think it is the disk. I have windows 7 already installed (and would like to keep it) It was installed on the end of the hard drive leaving a 100 GB chunk in the center of the drive open and unformatted (this may be the problem). Anyway I used the live cd and tried to format the unformatted partition to exf but it gives me this error
Code: Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sda, start=105906176, size=104752742400, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 Entering MS-DOS parser (offset=0, size=500107862016) MSDOS_MAGIC found found partition type 0xee => protective MBR for GPT Exiting MS-DOS parser Entering EFI GPT parser GPT magic found partition_entry_lba=2 num_entries=128 size_of_entry=128 Leaving EFI GPT parser EFI GPT partition table detected containing partition table scheme = 3 got it got disk new partition added partition start=105905664 size=512 committed to disk Error doing BLKPG ioctl with BLKPG_ADD_PARTITION for partition 2 of size 105905664 at offset 512 on /dev/sda: Device or resource busy
Do I have to reinstall windows for this to work or is there something I can try to do.
my computer is connected to my TV through HDMI using ATI HDMI output. I have written a small script to switch display from monitor to TV when a want to watch a DVD, but I didn't find how to switch sound from speakers to HDMI in command line. For the moment I have to open KDE system settings -> Multimedia and move sound devices by hand.
I have two partitions on my HDD. A Windows XP (hd0,2) and an Ubuntu 9.10 (hd0,1).I have been using the Windows mainly and ran a program that changes the HDD's serial number. Now when I boot up and Grub loads, I try to access the Windows partition and get the following error:
Error: No Such Device: 2e3857fb3857c08f
I am still able to boot the Ubuntu partition but can not seem to get grub to point to the Windows partition any more. This is very frustrating as I really need to get back into that partition soon.
I have a Linux application(ProMAX 5000) running in a virtual Machine on my windows OS. I am using an external Hard drive of 250G in ext2 file system as my device for large data read, write & execute file system. I have already mounted the device from /etc/fstab. But i want my application to access this device as a Primary data storage device OR Secondary storage device. What command will i invoke to partition this 250G drive as my primary or secondary storage device.
Whenever I am prompted to enter the root password, typical example would be in 'Power Management' clicking the button 'Make Default', pressing ENTER or clicking AUTHENTICATE doesn't close the box. To get passed this I have to press ALT+F4 and it continues which I'm assuming still does authenticate.
When I use rar e to extract a rar file, the request for entry of the password always says password will not be echoed. For longer passwords, this is difficult, since a single mistyped key will result in an error.
Does anyone know how I can use the rar command to extract and have the password echoed (appear on the screen as I type it)?