我可以更改分區號 ?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

我可以更改分區號 ?

#1

帖子 寺島聰子 » 2017-02-07 10:07

よろしくお願いいたします。
请多多关照

代码: 全选

jin@1:~$ sudo fdisk -l
Device     Boot     Start       End  Sectors  Size Id Type
/dev/sda1  *         2048  74096639 74094592 35.3G 83 Linux
/dev/sda2        74098686 156311551 82212866 39.2G  5 Extended
/dev/sda5       152129536 156311551  4182016    2G 82 Linux swap / Solaris
/dev/sda6        74098688 152129535 78030848 37.2G 83 Linux
Can I change the partition number attached to the device name such as / dev / sda?
Since I have installed and erased Linux many times with multi boot,
I feel ugly that it has 5 or 6.
Can sda 6 be sda 3 and sda 5 (swap) be sda 4 in order from the top of the physical hard disk?
我可以更改附加到設備名稱的分區號,如/ dev / sda嗎?
由於我多次安裝和擦除Linux多次啟動,
我覺得醜陋,有5或6。
sda 6可以是sda 3和sda 5(swap)是sda 4從物理硬盤的頂部開始順序嗎?
附件
20170207 .png
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 我可以更改分區號 ?

#2

帖子 科学之子 » 2017-02-07 11:28

I think you should use mkinitramfs
See also :

代码: 全选

man mkinitramfs
Tue Feb 7 12:41:15 CST 2017 add:
See also :

代码: 全选

man initramfs-tools
It let you can boot a Debian-based system from almost any file path

than meaning you can install and use multiple Debian-based system in a single partition
上次由 科学之子 在 2017-02-07 12:46,总共编辑 2 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我可以更改分區號 ?

#3

帖子 poloshiao » 2017-02-07 11:53

我可以更改附加到設備名稱的分區號,如/ dev / sda嗎?
1. http://unix.stackexchange.com/a/18759
it is a bad idea and you can lose everything.
1-1. If you still want to do it, refer to :
http://unix.stackexchange.com/questions ... a1-to-sda2
Change the number of the partition from sda1 to sda2

2. For your Reference :
2-1. There are many ways to mark and differentiate the partitions in a disk, Like label,uuid,partuuid,partlabel,.....
sometimes they are recommended to be used instead of /dev/sdax.
2-2. http://manpages.ubuntu.com/manpages/xen ... unt.8.html
The device indication
2-3. http://manpages.ubuntu.com/manpages/xen ... tab.5.html
The first field (fs_spec)
LABEL=<label> or UUID=<uuid> may be given instead of a device name. This is the recommended method, as device names are often a coincidence of hardware detection order, and can change when other disks are added or removed.
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我可以更改分區號 ?

#4

帖子 寺島聰子 » 2017-02-08 2:05

目的就是一邊學習LinuxOS、一邊學習中文
我的問題是“我想用中文,溝通,閱讀好文章,Linux或其他有趣的網站中文
I used LinuxOS for about 1 years, now I use mint and ubuntu . Both are mate desktop environment is.
Because I can not write English or Chinese, I use machine translation
しかし漢文古文に憧れがあり、そちらの趣味を兼ねています
但在中國古典古文字的渴望,也可作為有愛好
-----------
科学之子 さん、poloshiaoさん、いつも有り難うございます。
直接関係ないことですが、何とか表現したく思い、書きました。
Mr.科学之子, Mr. poloshiao , always thank you.
Although it is not directly related, I wanted to express it somehow and wrote it.
onlylove
论坛版主
帖子: 5371
注册时间: 2007-01-14 16:23

Re: 我可以更改分區號 ?

#5

帖子 onlylove » 2017-02-08 2:35

如果你要学习中文,可以去 http://www.jcinfo.net 寻找看看有没有合适的,或者尝试下中文的日语教材
至于 linux,建议你学好英语,还有建议不要半夜逛论坛,对身体不好
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我可以更改分區號 ?

#6

帖子 poloshiao » 2017-02-08 9:57

目的就是一邊學習LinuxOS、一邊學習中文
しかし漢文古文に憧れがあり、そちらの趣味を兼ねています
但在中國古典古文字的渴望,也可作為有愛好
Computer software with Chinese is too simplified for the purpose of learning chinese, especially for learning classic chinese and living conversation, i.e. you had better add some courses directed towards your special purpose to learn chinese.
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我可以更改分區號 ?

#7

帖子 寺島聰子 » 2017-02-08 17:26

"科学之子"様

代码: 全选

man mkinitramfs

代码: 全选

man initramfs-tools
http://gihyo.jp/admin/serial/01/ubuntu-recipe/0384
Although I tried to understand with reference to the above web page etc., I still could not understand and the reply was delayed.
雖然我試圖理解參考上面的網頁等,我仍然不能理解,答復被推遲。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我可以更改分區號 ?

#8

帖子 poloshiao » 2017-02-08 18:12

mkinitramfs
雖然我試圖理解參考上面的網頁等,我仍然不能理解
Refer to :
1. https://wiki.ubuntu.com/Initramfs
2. https://en.wikipedia.org/wiki/Initramfs
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我可以更改分區號 ?

#9

帖子 寺島聰子 » 2017-02-08 18:29

it is a bad idea and you can lose everything.
了解

代码: 全选

jin@1:~$ lsblk -f
NAME   FSTYPE LABEL  UUID                                 MOUNTPOINT
sda                                                       
├─sda1 ext4   mint2  3fb1c77c-7d46-4243-a955-790755e6023b 
├─sda2                                                    
├─sda5 swap          b27697f1-613f-485f-be6e-e1e5b65f1b14 [SWAP]
└─sda6 ext4   ubuntu fdbadeb3-1cf6-4d23-9a83-61d080ba2afe /
jin@1:~$ 
LABEL=<label> or UUID=<uuid> may be given instead of a device name. This is the recommended method, as device names are often a coincidence of hardware detection order, and can change when other disks are added or removed.
了解
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我可以更改分區號 ?

#10

帖子 寺島聰子 » 2017-02-09 1:59

https://en.wikipedia.org/wiki/Initrd
>Rationale

Many Linux distributions ship a single, generic Linux kernel image – one that the distribution's developers create specifically to boot on a wide variety of hardware. The device drivers for this generic kernel image are included as loadable kernel modules because statically compiling many drivers into one kernel causes the kernel image to be much larger, perhaps too large to boot on computers with limited memory. This then raises the problem of detecting and loading the modules necessary to mount the root file system at boot time, or for that matter, deducing where or what the root file system is.[1]

To avoid having to hardcode handling for so many special cases into the kernel, an initial boot stage with a temporary root file-system — now dubbed early user space — is used. This root file-system can contain user-space helpers which do the hardware detection, module loading and device discovery necessary to get the real root file-system mounted.[2]
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 我可以更改分區號 ?

#11

帖子 poloshiao » 2017-02-09 6:08

1. https://en.wikipedia.org/wiki/Initramfs
initramfs, abbreviated from "initial RAM file system", is the successor of initrd ("initial ramdisk").
1-1. So initramfs is the current one used in Ubuntu instead of initrd.
1-2. https://wiki.ubuntu.com/Initramfs
At a first glance, it is only slightly different than a traditional initrd. Initramfs' are loaded quite a bit sooner than initrd's are.

2. Other tools installed in Ubuntu by default :
2-1. sudo dpkg -l | grep initrd
No
2-2. sudo dpkg -l | grep initramfs
Yes, many tools.
寺島聰子
帖子: 688
注册时间: 2016-06-03 14:39
系统: debian11 mate

Re: 我可以更改分區號 ?

#12

帖子 寺島聰子 » 2017-02-12 18:26

:Love :Adore
onlylove 写了:建议你学好英语,还有建议不要半夜逛论坛,对身体不好
I suggest you learn English, there are recommendations not to visit the forum at midnight on the body is not good
ありがとうございます 谢谢
そのように致します 我做这样的
:Aadterboom
回复