Есть ли смысл ставить линукс на внешний ссд ?
Здравствуйте, собираюсь купить внешниий ссд, что бы поставить на него линукс, т.к на ноуте основной ос стоит винда(рядом ставить линь не хочу).Есть ли в том смысл и не будет ли работоспособность в данном случае хуже?
Ну, в зависимости от переходника SATA-USB, всё будет от терпимо до ужасно. Но работать будет.
Отрежь под линукс раздел, поставь и увидишь. Не понравится — удалишь раздел.
Если не USB 2.0, то нормально можно жить.
Думаю, будет не хуже, чем внутренний hdd. Скорость определяется скоростью usb2 порта.
Линейная скорость 60 Мб/с — вроде ниже, чем у hdd, но скорость мелкоблочных операций с произвольным доступом будет намного выше, чем у hdd. На скорость работы системы влияет именно скорость произвольного чтения. Линейная скорость — это про хранение больших массивов данных (бэкапы, мультимедиа) которые разом записываются сотнями гигов.
А если бы grub допилили поддержку xhci было бы вообще шикарно, но увы.
Это usb 2.0, у 3.0 выше.
А если бы grub допилили поддержку xhci было бы вообще шикарно, но увы.
А причём тут это, он разве не в режиме legacy hdd читает всё?
Если usb3 то вполне нормально не хуже чем на внутреннем hdd.
Не мучай флешку, ставь в виртуалку.
Если тебе нужно, то смысл есть. Всё относительно
Работоспособность будет хуже, чем на нормальном диске и лучше, чем на флешке. Всё тоже относительно. Ищи переходник с USB 3.x, он не сильно дороже старого, а работает гораздо веселее.
Всё правильно. usb2. А c usb3 ты как собрался грузиться? Grub с устройств поключенных к usb3 не грузится по причине отсутствия соответствующего модуля. UEFI тоже насколько знаю, устройства подключенные к usb3 как загрузочные не рассматривают.
он разве не в режиме legacy hdd читает всё?
легаси тут каким боком?
UEFI нормально с usb3 загружает.
При том что биос эмулирует обычный хдд когда грузишься с флешки (если включена эта опция). Я конечно не проверял, но мне кажется этого достаточно чтобы grub смог прочитать с неё ядро. Хотя может быть эта эмуляция только для флешек и с внешним usb ssd не будет делаться, опять же не проверял.
Это о скорости USB2? Если да, реальные скорости там будут там будет 30-35 МБ/сек.
А c usb3 ты как собрался грузиться?
Лично у меня ноут вполне спокойно грузит с USB3-внешнего накопителя и Linux, и Windows 10. Вообще никаких проблем не видел. Разве что нужно было танец сплясать, чтобы Windows 10 согласилась устанавливаться на внешний накопитель.
Это о скорости USB2? Если да, реальные скорости там будут там будет 30-35 МБ/сек.
С флешки так и будет. Винт или ssd без проблем полную скорость 480 МБит выдают.
С UEFI точно да, у меня так довольно долго Windows 10 жил на внешнем накопителе. В последний раз я раскатывал образ виртуальной машины, один из тех, что Microsoft раздаёт для тестов. Насколько помню, там MBR, поэтому ноут нужно было переключать в режим совместимости с MBR. Так что этот вариант тоже должен работать. Но у меня нет прямо железобетонной уверенности, что там именно MBR был.
Винт или ssd без проблем полную скорость 480 МБит выдают.
Прочитав сие, незамедлительно сунул USB3 адаптер с SATA SSD в USB2 порт и поимел на линейном чтении потолок в 42 МВ/с.
без проблем полную скорость 480 МБит выдают
480 МБит/сек именно полезных данных принципиально невозможно. 480 это сырая скорость. Часть полосы будет занята вспомогательными данными, поэтому полные 480 просто невозможны.
У меня сейчас нет в доступности компьютера, у которого есть одновременно и USB2 и USB3, или хотя бы USB3, умеющий работать в режиме USB2, поэтому проверить ещё раз прямо сейчас не могу. Но я помню, что лет десять назад внешний жёсткий диск легко читался на скоростях больше 100 МБ/с через USB3, но через USB2 там было только около 30.
Всё так, а иные адаптеры и 30 не выдавали.
или хотя бы USB3, умеющий работать в режиме USB2
Да ладно, не бывает таких. В USB3 нельзя вставить USB2 устройство?!
Чтобы отключить USB3 на разъеме можно воспользоваться тулзой uhubctl.
Контроллер не обязан быть в списке поддерживаемого оборудования uhubctl (просто логически отключит):
P.S. Не стоит отключать usb2, а потом usb3. Может пропасть адаптер целиком 😉
Придется делать rescan, что-то типа (номер pci-устройства свой):
Пишет «No compatible devices detected at location 2!» и всё. Устройство остаётся подключенным. Веб-камеру, которая подключена к внутреннему хабу, работающему на USB 2.0, удалось так отключить.
Вообще раньше, на других машинах, я просто выгружал xhci_pci и xhci_hcd , и ehci_pci подхватывал хабы, которые начинали работать как USB 2.0. На этом ноуте если выгрузить xhci_pci , USB вообще отрубается полностью. Модули echi_pci и ohci_pci никаких эффектов не дают.
Зависит от версий, вероятно. У меня на гигабайте 2k13 UEFI видит носитель, но запускать отказывается, а на леново 2k17 всё ок.
Пишет «No compatible devices detected at location 2!» и всё.
Пишет на uhubctl -f ?!
Опиция -f обязательна.
Да, опцию -f я указывал. В man-странице написано, что она значит.
Ну не знаю. Попробовал на компьютере на котором есть только xhci_pci — работает.
У тебя ноутбук/mac какой-нибудь?
Как установить linux на внешний ssd
Установка Ubuntu на внешний носитель (флешку или жесткий диск) в режиме EFI
Ежегодного после Software Freedom Day проходит уже ставший традиционным Linux Install Fest, где все желающие могут получить помощь в установке дистрибутива GNU/Linux на свои ноутбуки.
Вообще говоря, процедура установки современного дистрибутива GNU/Linux вроде Ubuntu не представляет никаких сложностей, даже в том случае, если его необходимо установить рядом с Windows 8/10 в режиме UEFI и включенным Secure Boot.
Но что делать, если требуется поставить GNU/Linux в режиме UEFI на внешний жесткий диск, флешку или карту памяти?
Казалось бы, вставляешь внешний носитель, и устанавливаешь GNU/Linux стандартным образом.
Но, к сожалению, все не так просто. Если вы начнете устанавливать GNU/Linux в таком режиме, то после перезагрузки вы уже не сможете загрузиться с внутреннего жесткого диска при отключенном внешнем носителе.
Проблема заключается в том, что при вызове update-grub обновляется содержимое NVRAM UEFI. Туда прописывается адрес EFI файла который находится на внешнем носителе, а информация о том, как грузиться со встроенного жесткого диска удаляется. Более подробно о процессе загрузке можно почитать здесь: http://www.rodsbooks.com/efi-bootloaders/installation.html
Зачем вообще ставить GNU/Linux на внешний носитель? Причины могут быть различны. Например, я столкнулся с проблемой, что на встроенном диске недостаточно места для установки двух ОС. Серьезно, в ноутбуке был установлен SSD объемом 32ГиБ, чего с трудом хватало даже для работы голой Windows 8.1.
Так же многие новички боятся ставить незнакомую ОС на свой компьютер, или не уверены, нужна ли она им вообще, а попробовать хочется. В этом случае флешка с полноценным GNU/Linux идеальный вариант. (Не просто LiveUSB, а полноценно установленная ОС, как если бы она была установлена на жесткий диск, чтобы оценить все её достоинства).
Все, что описано ниже, рассчитано на опытного пользователя GNU/Linux. Все, что вы делаете — Вы делаете на свой страх и риск. Автор не несет никакой ответственности за Ваши действия или бездействия, которые повлекли за собой порчу или полную потерю Ваших данных.
В качестве примера будем ставить на внешний диск Ubuntu 16.04.
В качестве хост-системы используется Kubuntu 16.04.
Потребуется следующий набор ПО:
Для начала скачаем образ Ubuntu 16.04:
Затем создадим пустой файл, который будет использоваться в качестве виртуального жесткого диска. (Инсталлятор Ubuntu 16.04 требует как минимум 9ГиБ свободного места на диске, но мы возьмем чуть больше — 10ГиБ)
Создадим vmdk, чтобы этот “диск” можно было подключить в VirtualBox:
Теперь приступим к созданию виртуальной машины со следующими характеристиками:
- тип ОС GNU/Linux
- в качестве жесткого диска указать созданный выше виртуальный диск
- включить загрузку через EFI
Теперь запускаем виртуальную машину, выбираем загрузочный диск, устанавливаем и настраиваем систему.
Из ньюансов: я рекомендую сделать разбивку жесткого диска следующим образом:
- первый раздел EFI, размер 500МиБ
- второй раздел ext4, точка монтирования ‘/’, все оставшееся место
- раздел swap создавать не нужно, т.к. во первых скорее всего на медленной флешке он будет очень сильно фризить систему, во вторых это увеличит размер установочного образа, что потребует больше времени на заливку его на целевую флешку(или жесткий диск). В конце концов, swap раздел можно создать потом, или же вообще обойтись swap файлом, чего более чем достаточно.
Почему-то после установки Ubuntu VirtualBox отказался грузить установленную систему. При повторной установке проблем не возникло. Странно. Потом нужно будет разобраться.
После установки необходимо немного порпавить конфигурационные файлы grub.
Для того, чтобы grub не трогал память NVRAM UEFI необходимо отредактировать файл /etc/grub.d/30_uefi-firmware следующим образом: добавить exit 0 сразу после #!/bin/sh :
Но это еще не все, по умолчанию UEFI ищет загрузочные образы не в том месте, куда их кладет grub, поэтому нам нужно создать еще один скрипт /etc/grub.d/42_custom со следующим содержанием:
и сделать его исполняемым
Вот и все! Теперь осталось обновить загрузчик и можно приступать к копированию образа на реальный диск:
Далее вам следует быть предельно острожным, и не перепутать буквы диска. Будьте внимательны. Так же Вам необходимо выполнять все нижеописанные команды от имени суперпользователя.
Для эксперимента возьмем внешний жесткий диск и зальем на него созданный образ:
теперь запустим GParted и выставим нужный размер разделов (При запуске GParted скорее всего ругнется, что геометрия диска /dev/sdX не совпадает с таблицей разделов. Смело жмем “Fix”)
Теперь можно подключать жесткий диск к ноутбуку смело загружаться в GNU/Linux!
В случае, если потребуется добавить своп, то можно воспользоваться следующим рецептом:
Создаем своп файл (от имени суперпользователя):
И добавляем в конец /etc/fstab следующую строку:
На этом, пожалуй, все. Всем добра и пингвинов!
Ссылки
Все материалы сайта, если не указано иное, распространяется под лицензией Creative Commons Attribution-ShareAlike 4.0 International License (c) Алексей Дураченко.
Installing Linux (Ubuntu 20.04) on an external portable SSD and pitfalls to be aware of
Carry your Ubuntu OS anywhere without being limited by hardware
TL;DR Skip to “Installation Process”
Choosing your Operating System is difficult
If you are a software developer, you have probably come across the dilemma of choosing your operating system. This is a big decision to make, since each operating system comes with its own pros and cons, and you will be stuck with them for quite a while. For people who are just getting into coding, below is my personal opinion on pros and cons of each operating system.
Why programmers tend to prefer Linux is because a lot of open-source code (especially in the research stage) are developed on it. This doesn’t mean that it is better than Windows or Mac necessarily, but it is definitely more accessible because it is free and open-source, so many research labs, companies and cloud computing providers run Linux on their remote clusters. Therefore, the software they develop are most often tested on Linux distributions such as Ubuntu, but may not be tested on Windows or Mac OS, and you might have to spend a while to find a work around.
On the other hand, using Linux has its own drawbacks; many proprietary products such as business, gaming and industrial software do not support Linux because Windows and Mac OS have a larger share of the market. For instance, Microsoft Office and Adobe Products are only available on Windows and Mac OS, and in order to install it on Linux you would have to do a work around such as installing on top of PlayOnLinux. If you want to develop mobile apps, you need a Mac because iOS app development is only possible on a Mac. If you are a gamer, Windows is probably best suited. In terms of extending the laptop like we do in this article, a PC would be more suited than a Mac, since there are more ports and also configuring BIOS is difficult in Apple products.
Another issue I find is that, Ubuntu is less stable compared to Windows or Mac OS, especially when it comes to hardware compatibilities and drivers. While some problems are solvable given you have some familiarity with Linux, this can take a while. Also, since Linux’s primary strength is in its command line capabilities, its Graphical User Interface tends to be less developed, so Windows / Mac are definitely more user friendly in that sense.
A solution that worked for me: Windows laptop + Ubuntu external SSD
I credit my course mate for giving me this idea. Before this, I had a dual-booted Windows + Ubuntu laptop but I would not recommend this because my 500GB hard drive quickly filled up from hosting two operating systems, each with their own software. Despite moving out almost all personal files onto external drives, I barely had space left because some software can easily take up tens of GBs due to its cash. I was seriously considering buying a new laptop, but this external SSD idea saved me thousands of pounds.
The great thing about installing an Ubuntu OS on an external SSD drive is that, you can easily use and switch between both Windows and Ubuntu without sacrificing any storage space. What is more, you can now carry this SSD drive wherever you want, and plug it into any computer. As long as you know how to configure the BIOS/UEFL so that this will boot up, you can keep working with your familiar OS and software. The other good thing is that, in case you mess up the installation, you can always wipe the disk and try again. This can be a lot scarier if you are trying to install Ubuntu onto a partition sitting on your local storage.
The installation process that worked for me
This is not meant to be a comprehensive guide to installation, but I will try to outline what worked for me, and the pitfalls you should be aware of, because sometimes knowing what doesn’t work is just as important and saves an awful amount of time as knowing what works. I would suggest first trying this method out, and if this doesn’t work, read the “Helpful Resources” section.
Step 0. Before you start
What you would need:
- USB stick with 8G+ memory.
- Laptop (I have tried with Dell XPS)
- SSD drive* (e.g. I bought a Samsung T7 SSD with 1TB storage)
*Note: make sure that you have high read/write speed because your operating system performance can be bottle-necked by it. T7 has up to 1050MB/s. HDD, USB memory and SD are slower.
What you should be careful of:
- Make sure you back up your computer (especially personal files, but also your OS) in case something bad happens, which can be the case since we are going to do a lot of formatting, partitioning, and changing BIOS/UEFL settings.
- Wipe and format both the SSD drive and USB stick beforehand (they will be reformatted anyway but just to be sure)
Step 1. Create a bootable Ubuntu 20.04 LTS USB drive
First, you have to download the Ubuntu Desktop ISO image by going to the official website. Make sure to download the LTS version. In my case, I downloaded Ubuntu 20.04.4.
Next, if you are on Windows, you can use Rufus to write the ISO to your USB stick. You can read How to Create a Bootable Linux USB Flash Drive, the Easy Way to find out how to do this.
If you are already on Ubuntu, you can try creating the bootable USB stick with the “Startup Disk Creator” as outlined in the above article. It didn’t seem to work for me though, so I did this directly from the terminal. Read How to create a bootable USB drive from Ubuntu terminal?
What you should be careful of:
- Double check that you are writing the ISO image to the correct drive. Don’t overwrite your local storage.
- Double check that the ISO file you downloaded is not corrupted. This can be done by following How to verify your Ubuntu download.
It actually took me a day to get this step working because of two factors
- I initially tried to use a cheap USB stick that I got at a career event. DON’T USE THESE. You will waste a lot of time scratching your head later on when you try to boot Ubuntu and fail. Use a proper and reliable USB stick.
- When I used the “Startup Disk Creator” in Ubuntu, I got a “/casper/vmlinuz not found” error. It turned out that my bootable USB stick was corrupt, so I had to create this from the command line. The same happened when I tried to use my other laptop which comes with a non-English Windows OS to create the USB stick. Make sure that your OS language setting is in English if this happens.
Step 2. Change boot settings
Now, with your newly bootable USB plugged in, we have to change your laptop behaviour upon boot. On most machines, you can enter the boot menu when the computer starts if you press a certain key. This depends on the laptop, but they are usually either Esc, F2, F10 or F12. On my Dell XPS 15, pressing both Fn and F2 at the same time takes me to the boot settings page. Make sure to practice this so that you can always comfortably go to the boot menu.
Now that you are in the boot menu, you have to do two things. Firstly, you have to change the General > Boot Sequence so that your Ubuntu USB comes to the top. Secondly, you should go to System Configuration > Driver and uncheck every drive you see listed. This will disconnect your internal storage upon boot so that you won’t accidentally overwrite these when you are installing Ubuntu to your external SSD. This will avoid most of the problems that the article I followed (How to Create a Truly Portable Ubuntu Installation on an External USB HDD or SSD, which is, by the way, an amazing article) addresses, namely that the EFI partition might be overwritten and that you have to install Grub yourself.
You can easily reconnect your internal storage afterwards once you finish your installation by going to the boot menu and ticking the boxes again.
Step 3. Boot Ubuntu from bootable USB
Now reboot your laptop with the bootable USB plugged in. In the first menu that shows up, don’t select the normal Ubuntu, but try “Ubuntu (safe graphics)”. This will save you a lot of pain of waiting on a stalled installation. After a while, a loader with options of “Try Ubuntu” and “Install Ubuntu” will come up. You can choose either one. If you choose Try Ubuntu, Ubuntu will load from your USB for the time being, and on the desktop there is a shortcut to “Install Ubuntu”. I personally prefer this way because the fonts appear much bigger, and you can do other things on the temporary Ubuntu while the installation is ongoing.
Step 4. Install Ubuntu onto External SSD
Once you move to the installation screen, connect your external SSD and follow the instructions. At one point, they will ask for the installation type. Now, in the other tutorial I followed, the author recommends partitioning your disk yourself. However, I wanted to take advantage of the LVM encryption feature that comes in the “Advanced features” option if you choose “Erase disk and install Ubuntu”. This works only if you have disconnected all internal storage in the boot setting as outlined in Step 2 — otherwise, there is a risk that your local EPI partition will be overwritten as the above article warns. If you see more than these two options, you may still have some internal storage that are not disconnected, or you might not have wiped your external SSD beforehand.
The only other downside to choosing the default setting rather than going for a custom “Something else” option is that, you can’t decide how your hardware will be partitioned. This is especially annoying for the swap partition, which is only given
800MB in the default setting. We can later fix this by adding our custom swap file.
The rest of the installation process should be straightforward. When you choose your username, make sure that you don’t have any spaces. This can help you avoid a lot of headaches down the line. Once everything is installed, you can reboot your laptop. The screen should ask you to remove your bootable USB before it reboots.
Step 5. Updating software and drivers
Once the system reboots, hooray, you have a working Ubuntu OS on your external SSD! Don’t celebrate too soon though. Wait until you finish updating your software and drivers.
General Software Update
You can either use the Software & Update GUI interface to update packages, or you can perform
Nvidia Driver Update
By default, Ubuntu uses a third party driver instead of the Nvidia proprietary driver. To change this to the official drivers, you can follow either of the below.
Change GRUB settings
There’s one thing I would do straightaway (even if you don’t have any issues), which is to update the GRUB setting so that Ubuntu will print out logs onto the screen upon boot. Upon your initial boot, open /etc/default/grub with your favourite text editor (for example, by running sudo gedit /etc/default/grub ) and where it says
Also, set GRUB timeout to something more than 0, so that if you want to open the GRUB menu upon boot, you can do so by pressing the shift key.
Once you save and close the text editor, reflect the updated GRUB settings.
Things to be aware of:
This is where I struggled the most. I must have tried at least 20 installations following the article I mentioned, but every single time, my Ubuntu kept hanging at reboot with a blinking underscore cursor with no error messages. Updating the GRUB setting as above provided me with the logs, but still, they were kind of misleading and was a red herring because Ubuntu kept hanging at different logs when I tried rebooting multiple times.
Eventually I realised that Ubuntu was simply failing to load the GUI login screen in time, which is typically handled by GDM3. This was confirmed because if I open up the terminal with Ctrl + Alt + F3 and I manually type sudo service gdm start I was able to start the GUI login screen. Reading this StackOverflow thread was helpful.
In the end, what worked for me was to not follow the article above but to follow the default Ubuntu installation procedures, with encryption enabled. I haven’t tried comparing the encrypted version and non-encrypted version, but I am suspecting that the amount of time I take to type in my password to unlock the hard drive is enough time for the X server to start running so that the GUI can launch properly (I came to this conclusion because whether Ubuntu stalls seemed pretty random, when I tried rebooting multiple times without any changes to the system). But I could be wrong.
The other option that worked for me (with custom partitions following the article) was to switch to lightdm by doing the following.
This was not necessary with the default installation procedure.
Step 6. Add custom swap file (optional)
Swap spaces are used when the OS runs out of RAM and wants to offload some unused data in the RAM. By default, Ubuntu installation only creates
800MB of swap space, which is tiny compared to what is usually expected (about the same size of your RAM). Fortunately, we can create a swap file within our main partition to basically do the same. For more details, please read How to Add Swap Space on Ubuntu 20.04.
Step 7. Reconnect your internal drives
Once you finish your setup and make sure that Ubuntu boots properly, it is safe to go back into the boot menu and re-enable the internal drives. Upon reboot, if Ubuntu doesn’t show, go back into the boot menu and reorder the boot sequence so that your Ubuntu SSD drive will boot first.
Final thoughts
Although the final procedure I converged to is fairly straightforward, it has been a long journey since I had to eliminate all other possibilities of failure along the way by the method of trial and error. I hope this article will help some people avoid potentially wasting a lot of time chasing red herring error messages (if your installation or reboot stops with a certain log message, that doesn’t necessarily mean that that is a warning you should care about, especially if it doesn’t explicitly say “error”).
But I can assure you that the effort is totally worth it! You will never buy a new laptop again just because you are running out of internal disk space, which will save both your wallet and the planet!
Как правильно установить Linux на внешний ssd?
У меня есть необходимость в следующем:
Дано:
1. Есть устройство внутри которого стоит внутренний ssd с OC Windows 10;
2. Есть внешний ssd в кармане, который подключаю по usb на котором должна быть OC Ubuntu;
Задача:
Необходимо поставить Ubuntu на внешний ssd, что бы я мог его носить с собой и подключать к любому из устройств за которое сажусь, запускаться с этого ssd и тем самым всегда быть с своим рабочим окружением в кармане. Это вызвано желанием перейти на Linux, начать его изучать и в конечном итоге сделать основной OC.
Можете ли подсказать тот момент, как установить Ubuntu на внешний ssd делая это на устройстве на котором есть внутренний и стоит Win10 ? Посмотрел гайды/статьи, — попробовал в установочнике покопаться сам, вызывает страх и нет точной инструкции к тому, как наверняка установить нужную OC только лишь на нужный диск не затронув другого, и не подтерев его файлы и не снеся винду, т.к. рабочая OC является именно рабочей с сборищем файлом и ей я навредить не имею правка в данный момент.