In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to move the OpenWrt system to the U disk". In the daily operation, I believe that many people have doubts about how to move the OpenWrt system to the U disk. The editor consulted all kinds of materials and sorted out a simple and easy-to-use operation method. I hope it will be helpful to answer the doubts about "how to move the OpenWrt system to the U disk". Next, please follow the editor to study!
First, the ssh login route.
First, partition the u disk
Root@OpenWrt: ~ # fdisk / dev/sda
Command (m for help): enter n # to create a new partition and enter enter
Partition type:
P primary (0 primary, 0 extended, 4 free)
E extended
Select (default p): # default primary partition, enter directly
Using default response p.
Partition number (1-4, default 1): # Zone number. By default, enter directly.
First sector (2048-8235007, default 2048): # start sector. By default, enter directly.
Last sector, + sectors or + size {KMagneMrect Greco Tpenp} (2048-8235007, default 8235007): + 1G # input + 1G enter, partition size set to 1GiB
Created a new partition 1 of type 'Linux' and of size 1 GiB.
# other partitions are similar to the above, omitted.
Command (m for help): W # press w enter to save exit
The partition table has been altered.
Calling ioctl () to re-read partition table.
Syncing disks.
II. Format the partition
Root @ OpenWrt: ~ # mkfs.ext4 / dev/sda1-O ^ has_journal,extent-L hg255d
Under the EXT4 file system, formatting with the "- O ^ hasjournal,extent" parameter can improve the performance of reading large files.
Copy all the files under the root directory "/" to the USB drive
Root @ OpenWrt: ~ # mount / dev/sda1 / mnt-t ext4 # Mount the first partition of the USB disk to / mnt
Root @ OpenWrt: create a root directory under ~ # mkdir / tmp/root # / tmp
Root @ OpenWrt: ~ # mount-o bind / / tmp/root # Mount and synchronize the system root directory "/" to / tmp/root
Root @ OpenWrt: ~ # cp-a / tmp/root/* / mnt/ # copy all files under / tmp/root to USB disk
Root @ OpenWrt: ~ # umount / tmp/root # Uninstall / tmp/root
Modify / mnt/etc/banner so that you can know if it is booted from a flash drive.
Root @ OpenWrt: ~ # vi / mnt/etc/banner
_
| |. -. | |. -. | | _
| |-| | _ | _ _ | | | _ | | _ |
| | _ | | _ _ | _ _ | | _ | | _ _ | | _ |
| | _ | W I R E L E S S F R E E D O M |
BARRIER BREAKER (Bleeding Edge, r41302)
From USB device... # added identity
* 1x2 oz Galliano Pour all ingredients into
* 4 oz cold Coffee an irish coffee mug filled
* 1 1 oz Dark Rum with crushed ice 2. Stir.
* 2 tsp. Creme de Cacao
Root @ OpenWrt: ~ # umount / dev/sda1 # Uninstall / dev/sda1
IV. Modify / etc/config/fstab configuration
The original configuration is as follows:
Config 'global' option anon_swap' 0' option anon_mount'0' option auto_swap'1' option auto_mount'1' option delay_root'5' option check_fs'0'
After modifying the configuration, it is as follows:
Config global option anon_swap'0' option anon_mount'0' option auto_swap'1' option auto_mount'1' option delay_root'5' option check_fs' 0'config mount option device'/ dev/sda2' option fstype 'ext4' option enabled' 1' option options' rw,sync' option target'/'
Restart routing
After restarting the route, ssh logs in to the route. Seeing the logo we added in the printed banner message means that the system has been moved to the flash drive.
At this point, the study on "how to move the OpenWrt system to the USB flash drive" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un