# Hello from linux/doze



## cjhmdm (Jun 18, 2010)

I hope the title isn't misleading.. I really just wasn't sure what else to call it heh..

The main purpose of this post is to say hello to what looks to be a very strong community, as well as to ask a question.

A little bit about me... I first delved into the linux world in 2006 after trying endlessly to set up a secure win2k server. Lot's of money and sleepless nights later, an admin friend of mine suggested I try linux. He helped me get it (Debian) installed and set up, then pretty much left me to it so I could learn.

Today, I love Debian and will only run Debian on my servers (no pun intended, I may end up loving freebsd just the same). When someone comes to me about making a switch to linux, I point them to Linux Mint, which to me is almost what Ubuntu should be.

Anyway (I'm trying not to be too long winded here heh), I am personally bored with Linux as a desktop platform. There's nothing wrong with it per say, I guess in the end I just want to try something new, oh and I want to finally rid of Windows completely if possible... which is why I'm here 

I decided to go with FreeBSD over PC-BSD simply because I prefer doing things from a terminal. I'm actually posting this now from within PC-BSD and find it kind of lacking.. what it's lacking, I don't know yet. I guess it's just too GUI for my tastes hehe.

Now, I know this might sound ironic considering I'll be setting up FreeBSD as a desktop, but in the end I want to see everything BSD has to offer, and just don't get the feeling I'll find that using PC-BSD (I could be wrong so don't hold me to that statement).

Anyhow, I have quick and embarrassing question to ask... embarrassing because it's probably so stupidly simple, but nonetheless...

Would someone please tell me the equivalent of "fdisk -l" in linux? So far, this is the one thing I simply cannot figure out.. yes, I can view my mounted disks using KDE Info Center, but I'd like to be able to display all disks, mounted or not as well as all slices (partitions) on them, from a terminal. 

Thanks for reading my mini bio (I removed probably 80% of what I originally wrote to keep it as short as possible) and I will be forever grateful if someone could point me in the right direction to find the answer to my question.

Have a good day everyone


----------



## SirDice (Jun 18, 2010)

cjhmdm said:
			
		

> Would someone please tell me the equivalent of "fdisk -l" in linux? So far, this is the one thing I simply cannot figure out.. yes, I can view my mounted disks using KDE Info Center, but I'd like to be able to display all disks, mounted or not as well as all slices (partitions) on them, from a terminal.


fdisk(8), bsdlabel(8), gpart(8) and sade(8). Take your pick.


----------



## cjhmdm (Jun 18, 2010)

I read the man pages, twice, so maybe I'm missing something.. here's an example of what I am trying to do:


```
cjhmdm@System-X ~ $ sudo fdisk -l
[sudo] password for cjhmdm: 

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa8a8a8a8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              13       16940   135964672    7  HPFS/NTFS
Partition 2 does not end on cylinder boundary.
/dev/sda3           16940       30402   108129281    5  Extended
Partition 3 does not end on cylinder boundary.
/dev/sda5           16940       29098    97654784   83  Linux
/dev/sda6           29098       30402    10473472   82  Linux swap / Solaris

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x54c854c8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       30402   244197528+  42  SFS
```

Maybe I just need to get some sleep and look over the man pages again tomorrow ><


----------



## jb_fvwm2 (Jun 18, 2010)

for starters,

```
#mount
```
then "fdisk" and the second
parameter, each disk found by the first command:
/dev/ad0, /dev/da0, /dev/ad1, etc
one at a time probably.
would cover most of what you posted as the linux command.


----------



## SirDice (Jun 18, 2010)

`# gpart show`

```
dice@williscorto:~>gpart show
=>       63  488397105  ad4  MBR  (233G)
         63  209712447    1  !7  (100G)
  209712510   39841200    2  freebsd  [active]  (19G)
  249553710   85979880    3  freebsd  (41G)
  335533590  152858475    4  freebsd  (73G)
  488392065       5103       - free -  (2.5M)

=>       0  39841200  ad4s2  BSD  (19G)
         0   1048576      1  freebsd-ufs  (512M)
   1048576   2097152      2  freebsd-swap  (1.0G)
   3145728   2097152      4  freebsd-ufs  (1.0G)
   5242880  12582912      5  freebsd-ufs  (6.0G)
  17825792  12582912      6  freebsd-ufs  (6.0G)
  30408704   4194304      7  freebsd-ufs  (2.0G)
  34603008   5238192      8  freebsd-ufs  (2.5G)

=>       0  85979880  ad4s3  BSD  (41G)
         0   8388608      4  freebsd-ufs  (4.0G)
   8388608   6291456      5  freebsd-ufs  (3.0G)
  14680064   6291456      6  freebsd-ufs  (3.0G)
  20971520   6291456      7  freebsd-ufs  (3.0G)
  27262976  58716904      8  freebsd-ufs  (28G)

=>        0  152858475  ad4s4  BSD  (73G)
          0         16         - free -  (8.0K)
         16  152858459      1  freebsd-ufs  (73G)

=>      0  3821568  da0  BSD  (1.8G)
        0       16       - free -  (8.0K)
       16  2099224    1  !0  (1.0G)
  2099240  1722328       - free -  (841M)
```
is probably the closest. 

You also need to keep in mind that what's known in Linux and Windows as a partition is called a slice in *BSD. Partitions are created inside a slice.


----------



## cjhmdm (Jun 19, 2010)

Thank you SirDice. Pretty much exactly what I was looking for 

Yep, I completely understand the breakdown of slices and partitions in *bsd. One of the first things I learned when I started down this road.

The way I understand it, for similarity sake only, is a slice is to *BSD what an LVM (or VG) is to linux. I know it's not an exact comparison, but it helps me remember ><

Thanks again for the above.. exactly what I needed


----------

