Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2016年10月12日学习内容 #4

Open
xingyi-leilei123 opened this issue Oct 12, 2016 · 0 comments
Open

2016年10月12日学习内容 #4

xingyi-leilei123 opened this issue Oct 12, 2016 · 0 comments

Comments

@xingyi-leilei123
Copy link
Collaborator

一、(PC2)以UEFI形式和GPT磁盘格式安装ubuntu16.04(64位)系统(openthos/testing-analysis/auto-testing-script)
1、首先要在UEFI中关闭cms选项,即把传统的BIOS功能关掉,只使用uefi模式启动:
开机按F2进入BIOS设置(开机按F12选择enter setup),选择BOOT,选择CSM parameters,选择luanch csm,并且设置其值为disabled,按Esc,然后插入Ubuntu16.04启动安装U盘,选择Save & Exit,然后save changes & reset
同方笔记本的设置方法: 开机根据提示按F2进入BIOS设置,选择anvanced,然后将OS support设置为UEFI OS,然后插入Ubuntu16.04启动安装U盘,选择Save & Exit,然后save changes & reset。
选择U盘启动(UEFI:Sony Storage Media PMAP),从U盘启动,进入安装第一界面,回车→选择第一个“使用ubuntu而不安装(t)”加到载试用版
2、格式化硬盘为GPT格式:参考文档 http://blog.csdn.net/zxj1988/article/details/7696417、http://blog.sina.com.cn/s/blog_67be3b4501016tnh.html、http://www.cnblogs.com/hnrainll/archive/2012/02/27/2369331.html
用parted工具分别对/dev/sda、/dev/sdb做GPT分区的过程:
root@node01:# sudo parted /dev/sda(/dev/sdb) //用parted工具对/dev/sda(/dev/sdb)进行分区选中
(parted) mklabel gpt //将MBR磁盘格式化为GPT磁盘
(parted) print //打印磁盘分区情况
Model: DELL PERC 6/i Adapter (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) quit //退出
3、sudo gparted进行磁盘划分
选择/dev/sda,new partition,选择大小,选择file system类型
/dev/sda1 uefi启动必须有一个放efi文件的位置(ESP分区) 必须为fat32格式 ESP分区为/dev/sda1
/dev/sda2 linux file system ext4格式 linuxOS安装到了/dev/sda2
/dev/sda3 ext4格式
/dev/sda4 linux swap 格式
/dev/sda5 android file system ext4格式 android安装到了/dev/sda40
如果想变换分区,需要修改*.sh中对应的参数,程序注释中也给出了提示。
4、以UEFI形式安装ubuntu到/dev/sda2
点击Install Ubuntu16.04LTS开/home/entity/.ssh/id_rsa始安装
安装类型选择其他选项,对/dev/sda1进行更改挂载到efi,对/dev/sda2进行更改挂载到/,对/dev/sda3进行更改挂载到/boot,对/dev/sda4进行更改挂载到swap
esp分区为/dev/sda1
5. 修改root密码 sudo su
passwd
6. apt-get install squashfs-tools【安装 squashfs-tools】
apt-get install openssh-server
7.修改ssh root登录 vi /etc/ssh/sshd_config
修改其中的PermitRootLogin without-password或者PermitRootLogin prohibit-password为PermitRootLogin yes
然后执行service ssh restart
8. 把PC2启动到linux,等待接收PC1的测试指令
二、(PC1)PC2的自动化测试【在PC1上操作】
1、在ubuntu部署ssh无密码登录
sudo su 以root 登录
ssh-keygen
root@os:/home/entity# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):/root/.ssh/id_rsa
Create directory'/root/.ssh'
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Pess enter key]
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
........

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant