15.4 不能把home放单独分区?
Tofloor
poster avatar
meteor00
deepin
2017-08-29 05:50
Author
本帖最后由 meteor00 于 2017-8-28 21:57 编辑

按度娘搜到的教程(http://blog.csdn.net/huntinux/article/details/11721813)把home移到一个已经存在的分区(之前用来放home的分区),重启之后会出现

安装的时候就设定home到这个已经存在的分区,装完重启依旧是上面的情况。

按照Deepin wiki上的“挂载”页面中“Linux系统盘分区太小,不够用,问是不是要重装系统?“一节里说的新建一个分区,然后移动home过去,能启动到登录界面,输入密码之后黑屏2两秒,又回到登录界面。

15.4和15.4.1都有这个情况。难道15.4 不能把home放单独分区?
Reply Favorite View the author
All Replies
avatar
jingle
deepin
2017-08-29 16:39
#1
Reply View the author
avatar
xushaohua
deepin
2017-08-29 17:05
#2
屏幕最上面那几行的内容是什么来着? 上面的照片看不清楚.

Reply View the author
avatar
meteor00
deepin
2017-08-29 17:48
#3
https://bbs.deepin.org/post/144773
屏幕最上面那几行的内容是什么来着? 上面的照片看不清楚.

跟最下面几行是一样的,我只是按了几次回车,都出现了一样的信息
Reply View the author
avatar
meteor00
deepin
2017-08-29 17:50
#4
https://bbs.deepin.org/post/144773
可以分 /home

@xushaohua

那现在已经装好的情况下还能移动么?
Reply View the author
avatar
comzhong
deepin
2017-08-29 17:56
#5
root account is locked 搜索论坛,有帖子
Reply View the author
avatar
anothersmile
deepin
2017-08-29 17:58
#6
分一个新区,挂载到/home就好了
Reply View the author
avatar
meteor00
deepin
2017-08-29 17:58
#7
https://bbs.deepin.org/post/144773
root account is locked 搜索论坛,有帖子

不是这个问题,把这个解除了依旧有这个情况
Reply View the author
avatar
meteor00
deepin
2017-08-29 18:00
#8
https://bbs.deepin.org/post/144773
分一个新区,挂载到/home就好了

不能用以前分来做home的分区么?
而且我试了下,按照wiki里说的做的,能看到登录界面但是登录不进去。
Reply View the author
avatar
wangyingtao
deepin
2017-08-29 18:39
#9
按照下面的内容改一下/etc/fstab文件,再重启试试

  1. $ blkid
  2. /dev/sda1: UUID="e40c3b5b-33bb-4b07-a575-440c960cbe20" TYPE="ext4" PARTUUID="00082102-01"
  3. /dev/sda5: UUID="fd99ec8f-ef19-4878-a519-c8ca17de5f68" TYPE="ext4" PARTUUID="00082102-05"

  4. $ cat /etc/fstab
  5. # /dev/sda1
  6. UUID=e40c3b5b-33bb-4b07-a575-440c960cbe20        /                 ext4              rw,relatime,data=ordered        0 1

  7. # /dev/sda5
  8. UUID=fd99ec8f-ef19-4878-a519-c8ca17de5f68        /home             ext4              rw,relatime,data=ordered        0 2

  9. /swapfile none swap defaults 0 0
Copy the Code
Reply View the author
avatar
comzhong
deepin
2017-08-29 18:39
#10
meteor00 发表于 2017-8-29 10:00
不能用以前分来做home的分区么?
而且我试了下,按照wiki里说的做的,能看到登录界面但是登录不进去。 ...

单用户登录不了?确定不是 “/etc/fstab”写错了?

U盘启动进live,先把 “/etc/fstab”改回去看看能不能登录
Reply View the author
avatar
meteor00
deepin
2017-08-29 18:48
#11
本帖最后由 meteor00 于 2017-8-29 10:51 编辑
https://bbs.deepin.org/post/144773
单用户登录不了?确定不是 “/etc/fstab”写错了?

U盘启动进live,先把 “/etc/fstab”改回去看看能不 ...

改回去可以登录。
我就是不了解ext4后面那些参数应该写什么,几乎每个教程都不一样……

Reply View the author
avatar
comzhong
deepin
2017-08-29 19:24
#12
本帖最后由 comzhong 于 2017-8-29 14:06 编辑
https://bbs.deepin.org/post/144773
改回去可以登录。
我就是不了解ext4后面那些参数应该写什么,几乎每个教程都不一样……

照这个试试
http://blog.csdn.net/xiaobing_blog/article/details/12718403
Reply View the author
avatar
meteor00
deepin
2017-08-29 19:33
#13
本帖最后由 meteor00 于 2017-8-29 11:37 编辑
https://bbs.deepin.org/post/144773
照这个试试

http://m.2cto.com/os/201310/249924.html

我之前好像看到过差不多一样的,照着做了,首先deepin里没有rsync命令,然后改用cp弄完了之后依旧是不行
Reply View the author
avatar
meteor00
deepin
2017-08-29 19:38
#14
https://bbs.deepin.org/post/144773
按照下面的内容改一下/etc/fstab文件,再重启试试

我试试看,多谢
Reply View the author
avatar
comzhong
deepin
2017-08-29 20:16
#15

我按下面的命令是成功的,完全没问题

===============================
sudo mkdir /media/homenew && sudo mount /dev/sda8 /media/homenew

sudo apt install rsync
sudo rsync -aXS --exclude='/*/.gvfs' /home/. /media/homenew/.

sudo diff -r /home /media/homenew/


sudo umount /media/homenew/ && sudo rm -r /media/homenew/

sudo blkid && sudo gedit /etc/fstab

cd / && sudo mv /home  /home_old && sudo mkdir /home


======================/dev/fstab
# /dev/sda3
UUID=e8a03c1c-1e98-49e1-8bf7-aab4fc85592f        /                 ext4              rw,relatime,data=ordered        0 1

# /dev/sda8
UUID=e8fcfe83-9c3e-440e-8edb-7b97ce124fc1      /home                ext4              rw,relatime,data=ordered        0 2

/swapfile none swap defaults 0 0
Reply View the author
avatar
wtz
deepin
2017-08-30 03:14
#16
很有可能是权限问题。ext4文件系统里记录的文件属主/属组是用id来标记的,而不是用户名/组名本身。如果原有home分区的文件属主的ID和新系统中的ID不一致,就无法登录。

解决办法:
root账户被锁定的情况下,很难在原来的系统中修改。需要先找个Live系统,比如你安装deepin时的启动盘。
然后切换到新系统中,查看/etc/passwd的内容,在里面找到你的用户id,一般是1000或者1001。
然后切换到home分区,打开命令行,输入
  1. sudo chown -R 1000:1000 用户名
Copy the Code

把“1000”替换成上面查到的用户id,“用户名”也做相应的替换。
如果home分区中有多个用户的主目录,也都按照此法更改。

重启以后应该就可以登录了。
Reply View the author
avatar
anothersmile
deepin
2017-08-31 23:45
#17
你可以试试用分区编辑器去做
Reply View the author