Proper way to add a new disk in Ubuntu

John DeCarlo johndecarlo at gmail.com
Mon Feb 7 14:18:40 UTC 2005


On Sat, 05 Feb 2005 15:37:19 +0100, Herman Bos <spacey at lichtsnel.nl> wrote:
>
> John DeCarlo wrote:

> >Went into fdisk and created a partition for the whole drive.  A few
> >false starts when I forgot to say "sudo" first.  (Sort of like Simon
> >Says.)
> >
> I always use cfdisk myself but if you created the partitions and wrote
> the changes to disk this should be OK.

yes, we agree on this.

> >I now had an hdb1 on my system, but no /dev/hdb1 entry.   mkfs
> >complained and wouldn't do anything.  I found that parted could format
> >a partition, and it did an admirable job, although it only had ext2
> >support that I could find (definitely not ext3).
> >
> I always format it like this:
> sudo mkfs.ext3 /dev/hdb1

Which I explained above did not work.  I did exactly that, but since
there was no actual file labeled /dev/hdb1 yet (although fdisk and
parted recognize that the partition exists), mkfs would do nothing.

> >Of course, still no /dev/hdb1.  So I couldn't mount it, either.
> >
> If you really don't have /dev/hdb1 are you sure its partitioned correctly.
> check with:
> sudo cfdisk /dev/hdb
> If this doesnt work check if the /dev/hdb shows up in 'dmesg'.

Yes, I did everything correctly.  I have done this many times in the
past with other Linux systems.  There must be something specific to
Ubuntu (or just something newer in general), like maybe 'hal', that
makes the system act differently.

> Also check if the partition number really is hdb1 and not hdb5 or
> something else.

Again, if you read my original post, it was hdb1.

> You should be able to mount your formatted partition like this:
>
> mount -t ext3 /dev/hdb1 /mnt/hd
> (assuming the /mnt/hd directory exists)
>
> If you want to have it mounted at bootup you can add an entry in /etc/fstab

No, you didn't read carefully.  I already noted that 'mount' would not
work, presumably because if you looked in /dev directory, there was
only hdb, not hdb1.  Any utility that looked at the disk saw the
proper partition and proper formatting.

> >I couldn't think of anything else to try, so I rebooted (boo, hiss).
> >
> >Of course this fixed everything and there was a /dev/hdb1 again.
> >
> >Any recommendations on what I *should* have done?  Should I have
> >restarted hal or something?

> I hope I understood your problem correctly. :) This how I add a disk to
> a system myself, maybe it helps.

No, unfortunately you misunderstood and repeated exactly what I tried
that did not work.

Anyone else with real information?

Thanks.

John DeCarlo, My Views Are My Own




More information about the ubuntu-users mailing list