Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, I am using anaconda installer and in the loader, before partioning the disks present i want to erase 8GB of disks. So i thought of writing 0 to the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    16

    Clearing of 8GB of disk before partioning


    Hi,

    I am using anaconda installer and in the loader, before partioning the disks present i want to erase 8GB of disks. So i thought of writing 0 to the device file sda,sdb ....When i am trying to open the file in the path /dev/sda, Its giving me no file or directory. Can anyone tell me what is the path of the device sda. before partioning ?
    I want to know the path of the device file(sda,sdb...) before partiioning the disks.

    Thanks
    Jomy

  2. #2
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    That depends if you use SCSI/SATA disks or ATA disks or whatever...

    However, assuming you use ATA-drives, here's an example to write zeros out all the master of the furst IDE-bus:
    Code:
    dd if=/dev/zero of=/dev/hda

  3. #3
    Just Joined!
    Join Date
    Jun 2005
    Posts
    16
    I am using SCSI disks,but when I am trying to open the file /dev/sda
    before partioning.It gives me an error No such file or directory.

    Can I use system command to execute the dd command from the loader.

  4. #4
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Hmmm... There are multiple distros using anaconda, which are you trying to install? If your distro uses devfs, you may find it under for example /dev/discs/disc0/disc or something like that (however, devfs never spread that much...). There is also a chanse that you have to give arguments before booting the install CD to load the scsi-drivers, try pressing F1 - F9 when it asks which kernel to boot and such, maybe that will explain which arguments to pass in order to use scsi...

  5. #5
    Just Joined!
    Join Date
    Jun 2005
    Posts
    16
    I am using anaconda 10.1.0.2-1 rpm for Fedora Core -3
    Can I call a script which clear all the disks in the %pre of the ks.cfg file.

  6. #6
    Just Joined!
    Join Date
    Jun 2005
    Posts
    16
    Okay,

    I got an idea, I will try to run a script using dd command to clear the disks upto size of 8GB in the %pre part of kickstart configuration file .

    But I have doubt regarding the dd command.If i need to clear last 2MB of the disk having disk size 10GB,how will I give the dd command

    Thanks for the help

    Jomy

  7. #7
    Linux Engineer
    Join Date
    Mar 2005
    Posts
    1,431
    Quote Originally Posted by jomy
    Okay,

    I got an idea, I will try to run a script using dd command to clear the disks upto size of 8GB in the %pre part of kickstart configuration file .

    But I have doubt regarding the dd command.If i need to clear last 2MB of the disk having disk size 10GB,how will I give the dd command

    Thanks for the help

    Jomy
    After reading the manpage again, I think it would be something like this:
    Code:
    dd if=/dev/zero of=/dev/sda bs=1024 ibs=XXXX
    I think you should replace XXX with the number of kilobytes before the starting point of the erase.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •