2022年5月8日 星期日

Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 重新分割硬碟(六)

Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 重新分割硬碟(六):

由於 Buffalo(巴比祿)原廠的系統硬碟(Hard Disk)容量只有大約 400MB,如果要安裝其它程式可能容量會不可應付,所以在安裝新的韌體前,建議先把系統磁區分割成大一點的容量,當然切割完所有資料都會不見,重要資料請記得先備份。

Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 重新分割磁碟
首先要下載 acp_commander.jar,程式是用 Java 寫的,所以要安裝 Java 才能執行,請到官方網頁下載。
在 Windows 下開啟 DOS 視窗後使用下面指令執行
啟動 Putty 用 Telnet 連接 Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS
接著就可以用 Telnet 連進去了(使用者名稱 root,無密碼)
硬碟(Hard Disk)分割資料:

fdisk /dev/sda

Command (m for help): p                if you hit "m" you see a help.

 

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot           Start         End      Blocks   Id  System

 /dev/sda1               1          25      200781   83  Linux

 /dev/sda2              26          87      498015   83  Linux

 /dev/sda4              88       30401   243497205    f  W95 Ext'd (LBA)

 /dev/sda5              88         104      136521   82  Linux swap

 /dev/sda6             105       30401   243360621   83  Linux


刪除所有硬碟分區,除 /dev/sda1分區。注意如果您刪除所有分區,該NAS將不再重新啟動,您祇可以刪除 /dev/sda1 以外的所有分區。

刪除硬碟(Hard Disk)分割資料:

fdisk /dev/sda

Command (m for help): p                if you hit "m" you see a help.

 

The number of cylinders for this disk is set to 30401.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OS

(e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): d

Partition number (1-6): 2

 

Command (m for help): d

Partition number (1-6): 4

 

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot          Start         End      Blocks   Id  System

/dev/sda1               1          25      200781   83  Linux


創建自定義硬碟(Hard Disk)分區硬碟:

fdisk /dev/sda

Command (m for help): n                if you hit "m" you see a help.

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (26-30401, default 26): <enter>

Using default value 26

Last cylinder or +size or +sizeM or +sizeK (26-30401, default 30401): +3000M

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

e

Partition number (1-4): 4

First cylinder (392-30401, default 392): <enter>

Using default value 392

Last cylinder or +size or +sizeM or +sizeK (392-30401, default 30401):<enter>

Using default value 30401

 

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot          Start         End      Blocks   Id  System

/dev/sda1               1          25      200781   83  Linux

/dev/sda2              26         391     2939895   83  Linux

/dev/sda4             392       30401   241055325    5  Extended


將擴展分區的分區類型更改為 W95 Ext'd (LBA)
更改硬碟(Hard Disk)分割資料:

fdisk /dev/sda

Command (m for help): t                if you hit "m" you see a help.

Partition number (1-5): 4

Hex code (type L to list codes): L

 

0  Empty              1c  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid

1  FAT12              1e  Hidden W95 FAT1 75  PC/IX           be  Solaris boot

2  XENIX root        24  NEC DOS         80  Old Minix       c1  DRDOS/sec (FAT-

3  XENIX usr         39  Plan 9          81  Minix / old Lin c4  DRDOS/sec (FAT-

4  FAT16 <32M        3c  PartitionMagic  82  Linux swap      c6  DRDOS/sec (FAT-

5  Extended           40  Venix 80286     83  Linux           c7  Syrinx

6  FAT16               41  PPC PReP Boot   84  OS/2 hidden C:  da  Non-FS data

7  HPFS/NTFS          42  SFS             85  Linux extended  db  CP/M / CTOS / .

8  AIX                 4d  QNX4.x          86  NTFS volume set de  Dell Utility

9  AIX bootable      4e  QNX4.x 2nd part 87  NTFS volume set df  BootIt

a  OS/2 Boot Manag   4f  QNX4.x 3rd part 8e  Linux LVM       e1  DOS access

b  W95 FAT32          50  OnTrack DM      93  Amoeba          e3  DOS R/O

c  W95 FAT32 (LBA)   51  OnTrack DM6 Aux 94  Amoeba BBT      e4  SpeedStor

e  W95 FAT16 (LBA)   52  CP/M            9f  BSD/OS          eb  BeOS fs

f  W95 Ext'd (LBA)   53  OnTrack DM6 Aux a0  IBM Thinkpad hi ee  EFI GPT

10  OPUS               54  OnTrackDM6      a5  FreeBSD         ef  EFI (FAT-12/16/

11  Hidden FAT12      55  EZ-Drive        a6  OpenBSD         f0  Linux/PA-RISC b

12  Compaq diagnost  56  Golden Bow      a7  NeXTSTEP        f1  SpeedStor

14  Hidden FAT16 <3  5c  Priam Edisk     a8  Darwin UFS      f4  SpeedStor

16  Hidden FAT16     61  SpeedStor       a9  NetBSD          f2  DOS secondary

17  Hidden HPFS/NTF  63  GNU HURD or Sys ab  Darwin boot     fd  Linux raid auto

18  AST SmartSleep   64  Novell Netware  b7  BSDI fs         fe  LANstep

1b  Hidden W95 FAT3 65  Novell Netware  b8  BSDI swap       ff  BBT Hex code (type L to list codes): f

Changed system type of partition 4 to f (W95 Ext'd (LBA))

 

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot        Start         End      Blocks   Id  System

/dev/sda1               1          25      200781   83  Linux

/dev/sda2              26         391     2939895   83  Linux

/dev/sda4             392       30401   241055325    f  W95 Ext'd (LBA)


創建邏輯分區用於 swap + data。
創建硬碟(Hard Disk)分割資料:

fdisk /dev/sda

Command (m for help): n                if you hit "m" you see a help.

Command action

   l   logical (5 or over)

   p   primary partition (1-4)

l

First cylinder (392-30401, default 392): <enter>

Using default value 392

Last cylinder or +size or +sizeM or +sizeK (392-30401, default 30401): +300M   

 

Command (m for help): n

Command action

  l   logical (5 or over)

  p   primary partition (1-4)

l

First cylinder (429-30401, default 429): <enter>

Using default value 429

Last cylinder or +size or +sizeM or +sizeK (429-30401, default 30401): <enter>

Using default value 30401

 

Command (m for help): p

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot          Start         End      Blocks   Id  System

/dev/sda1               1          25      200781   83  Linux

/dev/sda2              26         391     2939895   83  Linux

/dev/sda4             392       30401   241055325    f  W95 Ext'd (LBA)

/dev/sda5             392         428      297171   83  Linux

/dev/sda6             429       30401   240758091   83  Linux


將交換分區更改為交換(Extended partion →swap)
硬碟(Hard Disk)分割資料:

Command (m for help): t                if you hit "m" you see a help.

Partition number (1-6): 5

Hex code (type L to list codes): L

 

0  Empty            1c  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid

1  FAT12            1e  Hidden W95 FAT1 75  PC/IX           be  Solaris boot

2  XENIX root        24  NEC DOS         80  Old Minix       c1  DRDOS/sec (FAT-

3  XENIX usr         39  Plan 9          81  Minix / old Lin c4  DRDOS/sec (FAT-

4  FAT16 <32M       3c  PartitionMagic  82  Linux swap      c6  DRDOS/sec (FAT-

5  Extended          40  Venix 80286     83  Linux           c7  Syrinx

6  FAT16            41  PPC PReP Boot   84  OS/2 hidden C:  da  Non-FS data

7  HPFS/NTFS        42  SFS             85  Linux extended  db  CP/M / CTOS / .

8  AIX              4d  QNX4.x          86  NTFS volume set de  Dell Utility

9  AIX bootable       4e  QNX4.x 2nd part 87  NTFS volume set df  BootIt

a  OS/2 Boot Manag    4f  QNX4.x 3rd part 8e  Linux LVM       e1  DOS access

b  W95 FAT32        50  OnTrack DM      93  Amoeba          e3  DOS R/O

c  W95 FAT32 (LBA)   51  OnTrack DM6 Aux 94  Amoeba BBT      e4  SpeedStor

e  W95 FAT16 (LBA)   52  CP/M            9f  BSD/OS          eb  BeOS fs

f  W95 Ext'd (LBA)    53  OnTrack DM6 Aux a0  IBM Thinkpad hi ee  EFI GPT

10  OPUS            54  OnTrackDM6      a5  FreeBSD         ef  EFI (FAT-12/16/

11  Hidden FAT12     55  EZ-Drive        a6  OpenBSD         f0  Linux/PA-RISC b

12  Compaq diagnost   56  Golden Bow      a7  NeXTSTEP        f1  SpeedStor

14  Hidden FAT16 <3  5c  Priam Edisk     a8  Darwin UFS      f4  SpeedStor

16  Hidden FAT16     61  SpeedStor       a9  NetBSD          f2  DOS secondary

17  Hidden HPFS/NTF  63  GNU HURD or Sys ab  Darwin boot     fd  Linux raid auto

18  AST SmartSleep    64  Novell Netware  b7  BSDI fs         fe  LANstep

1b  Hidden W95 FAT3  65  Novell Netware  b8  BSDI swap       ff  BBT

Hex code (type L to list codes): 82

Changed system type of partition 5 to 82 (Linux swap)

 

Command (m for help): p

 

Disk /dev/sda: 250.0 GB, 250059350016 bytes

255 heads, 63 sectors/track, 30401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot       Start         End      Blocks   Id  System

/dev/sda1               1          25      200781   83  Linux

/dev/sda2              26         391     2939895   83  Linux

/dev/sda4             392       30401   241055325    f  W95 Ext'd (LBA)

/dev/sda5             392         428      297171   82  Linux swap

/dev/sda6             429       30401   240758091   83  Linux


將新分區表保存到硬碟。
保存硬碟(Hard Disk)分割資料:

Command (m for help): w                if you hit "m" you see a help.

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

 

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

 

sh-2.05b#reboot


格式化硬碟
  • 使用 mkfs.ext2/mkfs.ext3/mkfs.xfs 在 /dev/sda6 上創建文件系統
  • 使用 mkswap 在 /dev/sda5 上創建交換文件系統
  • 根據文件系統類型修改 /etc/fstab
硬碟(Hard Disk)分割資料:

root@LS-PRO:~# df

Filesystem           1k-blocks      Used Available Use% Mounted on

/dev/sda2              2907124    183660   2723464   6% /

/dev/ram1                15360        96     15264   1% /mnt/ram

/dev/ls_disk1_1         194443     10384    174020   6% /boot

/dev/ls_usbdisk2_1      991752    552268    389104  59% /mnt/usbdisk2

/dev/ls_disk1_6      240544192    234384 240309808   0% /mnt/disk1


2022年 5月 8日(Sat)天氣報告
氣溫:43.0°F / 6.0°C @ 07:00
風速:每小時 6公里
降雨機會:10%
相對濕度:百分之 80%
天氣:多雲時陰

相關網址:
※ Buffalo(巴比祿)LinkStation HD-HGLAN NAS 介紹(一)
※ Buffalo(巴比祿)LinkStation HD-HG250LAN NAS 開箱文(二)
※ Buffalo HD-HGLAN NAS 更換風扇
※ Buffalo(巴比祿)LinkStation Live HS-DHGL NAS 介紹(一)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 開箱文(二)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝和設置(三)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 升級為 Server(四)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 Freelink(五)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 重新分割硬碟(六)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 FreeLink(七)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 設置 FreeLink 系統(八)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 Debian 系統(九)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 FTP Server 系統(十)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 Apache(十一)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 MySQL(十二)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 PHP(十三)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝個人網站(十四)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 Samba Server(十五)
※ Buffalo(巴比祿)LinkStation Live HS-DH250GL NAS 安裝 Samba Client(十六)

沒有留言:

張貼留言