前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jetson tx1 配置SSD固态硬盘「建议收藏」

jetson tx1 配置SSD固态硬盘「建议收藏」

作者头像
全栈程序员站长
发布2022-09-07 10:02:30
2K0
发布2022-09-07 10:02:30
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

转载自:http://blog.csdn.net/hit2015spring/article/details/62217289

配置外置SSD

这里用的是三星 EVO 250G的SSD,支持SATA接口,ssd插上去开机是不能用的,TX1是没有识别的,需要的格式化为Linux支持的文件系统ext4.一系列配置之后可以把ssd设置为外置的存储,然后再把文件系统拷贝到SSD中,设置为从SSD启动系统。和PC机从BIOS启动不一样的是,TX1可以用好几种方式启动它。只要配置exlinux.conf就OK了。仔细看视频就可以配置好

  1. 断电,插ssd,上电
  2. 通过gui界面来设置,搜索DISKS,如图
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
  1. 格式化新建一个分区
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

新建:

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

name输入名字jetsonssd-256

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

Ok完成。

这里新建分区的时候是要输入盘的大小,输入250G,这个三星的ssd不能全部新建。

配置swapfile

这一步配置交换空间,TX1的内存只有4G,用来配置tensorflow是不够用的,在配置tensorflow之前要给它加一个交换空间,这个空间的功能是当物理内存不够时,将某些内存当中所占的程序暂时移动到swap当中,让物理内存可以被需要的程序来使用。另外,如果你的主机支持电源管理模式,也就是说,你的linux主机系统可以进入休眠状态的话,娜美运行当中的程序状态则会被记录到swap当中去,以作为唤醒主机状态的依据。

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

命令行:

[cpp] view plain copy

  1. git clone https://github.com/jetsonhacks/postFlashTX1.git
  2. cd postFlashTX1\
  3. ls
  4. $ sudo ./createSwapfile.sh -d [directory location] -s[size in gigabytes] –a

[directory location]:这里填写你的ssd路径地址

[size in gigabytes]:这里填写你要设置的swap的大小,以G为单位。

-a:是默认开机自启动swap,在/etc/fstab中自己设置

我设置了20G,默认是8G,一般的swap设置为内存的两倍。

下面这段话是该文章里头提到的一点问题,这里我们用不到,但是可以帮助以后找问题。

在SSD或其他闪存类型内存上设置交换文件可能会导致设备磨损。大多数当前闪存具有可以执行的读取和写入的生存期数量,繁忙的交换文件可以消耗大量的那些。请注意,硬盘驱动器也是如此。较新的SSD已经建立了帮助分发”写磨损”的机制。一如往常,备份您的驱动器,并将其存储。在视频中,交换文件在计算机引导时自动安装。这是伟大的开发,但之后,你可能要禁用该功能。为此:

[cpp] view plain copy

  1. $ sudo gedit /etc/fstab

并注释掉执行”swapon”的行。确保保存文件,重新启动并检查以确保交换已关闭。

此外,你可能想要有一个更硬的核心关于你的交换区。您可以留出”交换分区”,并使用它而不是交换文件。这种方法可能更快,因为交换区域连续放置。此路由类似于设置交换文件,但超出了本文的范围。

运行完后开始在disks里头设置

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

按照图中正确选择

然后重启系统。

设置从SSD启动系统:

开发板自带的emmc存储只有16G,第一步安装系统后只有4.4G,本次搭建tensorflow环境需要很多存储,所以需要扩展存储,但是不能就单单加个SSD就可以,这样把文件放在SSD是不好用的,需要将系统运行在SSD上才行,按视频教程后半部分将系统文件复制到SSD中,修改启动配置文件,使之从SSD内启动:

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

[cpp] view plain copy

  1. $ sudo cp -ax / ‘/media/ubuntu/jetsonssd’
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

修改配置文件

The last setup step is to modify the file extlinux.conf file on the eMMC. The system will boot from the internal eMMC, then the kernel will set the root directory to point to the SATA drive

[cpp] view plain copy

  1. $ cd /boot/extlinux
  2. $ sudo cp extlinux.conf extlinux.conf.original
  3. $ sudo gedit /boot/extlinux/extlinux.conf
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

这里主要修改几个地方

jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」
jetson tx1 配置SSD固态硬盘「建议收藏」

其实整个文件如下:

TIMEOUT 30 DEFAULT satassd

MENU TITLE p2371-2180 eMMC boot options

LABEL satassd MENU LABEL primary SATA SSD LINUX /boot/Image INITRD /boot/initrd FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec={lp0_vec} nvdumper_reserved={nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt Android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0root=/dev/sda1 rw rootwait

LABEL emmc MENU LABEL Internal eMMC LINUX /boot/Image INITRD /boot/initrd FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec={lp0_vec} nvdumper_reserved={nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait

标红的地方是修改的

重启ok

如果要从emmc启动,则改一下这里的配置就OK了。Label那个位置该一下。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/147800.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 配置外置SSD
  • 配置swapfile
  • 设置从SSD启动系统:
相关产品与服务
对象存储
对象存储(Cloud Object Storage,COS)是由腾讯云推出的无目录层次结构、无数据格式限制,可容纳海量数据且支持 HTTP/HTTPS 协议访问的分布式存储服务。腾讯云 COS 的存储桶空间无容量上限,无需分区管理,适用于 CDN 数据分发、数据万象处理或大数据计算与分析的数据湖等多种场景。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档