date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,485,760,371,000
The following find command will results multiple files and send mail all those find /home/cde -ctime -1 -name "Sum*pdf*" -exec uuencode {} {} \; |mailx -s "subject" [email protected] But I am getting attachments like homecdeSum123.pdf and homecdeSum324.pdf. How to get exact file names in my attachment.
If I understand you right, you want to have the attachments have filename like Sum123.pdf instead of homecdeSum123.pdf. I assume the latter name is produced by your mail program that removes the slashes in the path name when saving. I think you should use a different way to call uuencode, removing the path name on th...
Get only file name from find command and mail
1,485,760,371,000
I'm running Debian I've set up ssmtp as my MTA and this works perfectly I can send mail using both mail and mailx with a standard user account BUT... When I run sudo apticron I get: send-mail: RCPT TO:<[user]@[mydomain].com> (550 Sender verify failed) Any ideas? (I've blanked the email details myself - that's not p...
Your remote mail server doesn't believe root@yourdomain in the SMTP envelope¹ is a valid email address, so it's refusing messages from you. And that's where apticron is trying to send from, so it doesn't work. ssmtp allows you to override the default email address and relay on a per-user basis in the /etc/ssmtp/revali...
root can't send mail (apticron) but user can (mail/mailx)
1,485,760,371,000
I followed this tutorial: https://computingforgeeks.com/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04-lts/ I'm trying to setup a send only mail from my Ubuntu 19 server. I followed the guide above and tried to install mailutils using: apt install mailutils It installed something but...
Run dpkg-reconfigure postfix to see the wizard/GUI
Install Postfix using Mailutils on Ubuntu 19.04 server for sending out mail only
1,485,760,371,000
I'm using mailx and sendmail functions to send mail from set of solaris machine with different versions. And the script send mail for most of the machine. Still issue is there on sending out mail for few servers. But there is no error shown while execute this script. Script 1: uuencode report.html report.html | mailx...
It's been a long time since I last used sendmail on Solaris but I'm sure its -v flag will show what's going on: ( echo 'From: [email protected]' echo 'To: [email protected]' echo 'Subject: from me to you' echo finger ) | sendmail -t -v I'm also pretty sure that mailx passes this flag onwards: echo...
mailx execute successfully but not sending mail out
1,485,760,371,000
I have this user who have a lot of cron jobs and I expected it to log stderr in its /var/mail/user. Sample below cron entry is working as expected in a different server. * 30 * * * * /usr/local/bin/scripts/test.sh > /dev/null 2>&1 I've compared postfix/main.cf on both servers and cannot find anything different. Is th...
This is an explicit redirection in the cron command: > /dev/null 2>&1. It means both stdout and stderr are thrown away. There's no basis to expect any mail then. To keep stderr, leave just this redirection at the end: >/dev/null.
Cron is not logging stderr in /var/mail/user
1,485,760,371,000
I have an MBOX file created by dragging a folder from Outlook (For Mac v.16) into Finder (because the Export wizard in Outlook For Mac only generates OLM files). I can look at the MBOX contents as plain text, and it looks sane. I would like to verify the number of messages contained. But mailx doesn't seem to see an...
It could be that mailx objects to DOS linefeeds or some other problem with the export from Outlook. The format should otherwise be very simple; records start with a "From " line which is followed by the message headers, a blank line, and then the message body and I think another blank line before the next "From " reco...
Why does mailx see 0 messages in my mbox file?
1,485,760,371,000
When entering personal preferences like retain [email protected] inside command line mail, how can I have these saved so they are reloaded the next time I start mail?
There is no direct way to save the current settings. Instead, you have to write the desired settings to the user startup file, ~/.mailrc. This is referenced in the manual page for mailx (see man mailx), which says, At startup time, mail will execute commands in the system command file, /etc/mail.rc, unless explicitly...
How to retain retain et. al. in mail(x)
1,485,760,371,000
I'm sending email from a script using mailx. The script is run daily by systemd, using .service and .timer files. For testing purposes I'm sending from the command line. The mail is sent with the command echo "Test message - you know the drill" | mailx -r "[email protected]" -s "Test Message" [email protected] (perso...
Since you want to use pre-installed programs and because you have postfix installed, we can use a postfix mode to give you greater control of what you send and how it looks. This is done via sendmail -t. In this mode we use postfix as a mail submission agent (MSA), which is what mailx does anyway, and you can specif...
How to include a display name when sending mail with mailx
1,485,760,371,000
I am using mail from GNU Mailutils to read the contents of a Maildir. For emails that have already been marked as read, is there a way to mark them as unread in mail?
Update: As of GNU Mailutils version 3.14 (released on 2022-01-02), GNU Mailutils implements the "unread" command. An email can be marked as unread by pressing U. Old answer: This feature is not mentioned in POSIX mailx, and is not implemented by GNU Mailutils' mailx. S-nail and the BSDs' mailx support an unread comma...
mail: How do I mark an email as unread?
1,485,760,371,000
I am running Oracle Linux 7 for the purpose of hosting an Oracle database. As part of this process I run a script that mails a log file at the end on a daily basis. Crux of my issue is that my script executes the mailx command as root with no issue. When I run as the normal operation user "oracle", it fails with this...
See Jim L. comment on my question. It drove me to the answer. I had a bad export command that referenced /Tmp. Altering this to what it should have been (/tmp) fixed the issue. Lord save me from dumb typos.
mailx execution as non-root failing
1,437,580,070,000
There are two messages in /var/mail/test. mail Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/test": 2 messages 2 new >N 1 test@test Tue Feb 17 15:07 18/628 *** SECURITY information fo N 2 test@test Tue Feb 17 15:25 18/628 *** SECURITY information fo How to get the whole subject li...
Use Linux command line syntax as Read email if you have only email. echo p|mail |grep -A 1 "^Subject:" Read 1st email, change the number you want to read email. echo 'type 1'|mail |grep -A 1 "^Subject:"
How to display entire subject line in `mail`?
1,437,580,070,000
I have set some email server(postfix with tsl3) and i have reach the goal to remove ssl2 from it,but thunderbird works perfect,mailx no. I did echo prova|mail -S smtp-use-starttls user@domain and all mail are bounced said: 530 5.7.0 Must issue a STARTTLS command first (in reply to MAIL FROM command)) I use this conf...
Solution found On main.cf smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 smtpd_tls_protocols = !SSLv2, !SSLv3 smtp_tls_mandatory_protocols = !SSLv2, !SSLv3 smtp_tls_protocols = !SSLv2, !SSLv3 on master.cf smtp inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_clie...
ssl3 mailx and bounce
1,437,580,070,000
I am trying to attach multiple files in Unix, which are the result of a find command. When I try to send the mail, the attachments are missing. dir=$path echo "Entered into $spr/sum_master" for fil in `find $dir -ctime -2 -type f -name "Sum*pdf*"` do uFiles=`echo "$uFiles ; uuencode $fil $fil"` done \($uFiles\) | m...
If uFiles ends up containing the string foo bar qux, then the last line runs the command (foo with the arguments bar and qux). This results in the error message (foo: command not found (or similar), and mail gets an empty input. That's not the only problem with the script. The command that builds up the uFiles variabl...
Attachment missing in Unix mail when multiple files were attached
1,437,580,070,000
This is what I tried: $ mailx -s "test email" cloud Cc: "again and agina" . EOT Or, $ mailx -s "test email" cloud Cc: "this is the first email" << EOT But after pressing Enter nothing happens. Why?
There is nothing magical about the thee-letter-string EOT. You have probably seen it used as a delimiter in here-document redirections in shell scripts from time to time. Almost any word may be used as a delimiter for a here-document redirection, although it's customary to use a short-ish descriptive word written in a...
Why doesn't "EOT" end the message body and send the message when using "mailx"?
1,437,580,070,000
When logged into my server via SSH the $ mail command doesn't work properly. Instead of returning the list of mail it returns No mail for <user>. $ mail works correctly when on a terminal at the machine, so it's definitely an issue with using SSH, which is how I will need to access it.
I'm able to correctly read user mails by giving in input the file path: mail -f /var/spool/mail/$USER I also encountered some issue reading (root)user email, I ssh logged in with user phil, then I changed user to root typing sudo su and then issuing mail command I got: No mail for phil So it seems that mail command...
How to make 'mail' command work properly via SSH?
1,437,580,070,000
I'm trying to BCC e-mails through unix using the following command. echo "E-mail message" | mailx -r [email protected] -s "E-mails Subject" ~b [email protected] But I get the error ~b... User unknown. If I use -b instead of ~b, I get the error illegal option -- b If I use mail instead of mailx, I get exactly the same...
The -b option, to specify addresses on the command line, does not appear to be supported on your version. Your second, interactive example works because mailx recognises it as tilde escape. These have to appear as the first thing on the line in the message body, rather than on the command line. They're in the speci...
Can't send mails with BCC using mailx "illegal option -- b"
1,437,580,070,000
I am writing a program that will be sending external emails using postfix with the mail -s command and I need to verify that the email was sent to the specified address. In which case, I am curious if postfix right away reports an error that I am able to get as a return code if email failed sending or if postfix will...
If your postfix configuration is set for logs you can check the logs for the status of a message. It will contain information such as: Mar 25 16:07:40 serverName postfix/smtp[3113]: B169ZZZ24F: host foo.net.mx1.name.foo.net[1.2.3.4] refused to talk to me: 421 Offline: HELO/FDNS Mar 25 16:07:40 serverName postfix/smtp...
Does postfix using mail command report if an email was unable to be sent to an address?
1,437,580,070,000
How to increase the width of listings in mail command prompt? Especially the message listing with the command h. The current listing is truncated at 80 characters as showing below: $ mail Mail [5.2 UCB] [AIX 5.X] Type ? for help. "/var/spool/mail/root": 467 messages 1 new 467 unread U463 daemon Mon Mar 29...
I do not think this is possible. After examining the strings of /usr/bin/mail I choose two of them as how the message summaries are presented: %c%c%3d To %-13.13s %16.16s %8s %c%c%3d To %-13.13s %16.16s %8s "%s" Further, I found an approximate of this 'mail' program. UCB Mail Version 5.2 (6/21/85) (I'll look for an...
Increasing the width of messages listing in mail prompt
1,437,580,070,000
I'm trying to: Attach multiple files into one email. Have the email sent out using a Gmail account with the current date and time in the subject header. I'm having trouble with the for a loop since I don't want to create multiple emails I just one to create one email with all the attachments included and have the ...
Here's a bash script that might help others out that I got to work. #!/bin/bash currentdir="$(pwd)" #get current directory fn_dt_now_start=`date '+%Y_%m_%d__%H_%M_%S'`; #use to generate date time fn_txt=$(ls $currentdir/*.txt) #place txt files found into a variable for t in ${fn_txt[@]}; do ...
Attaching multiple files using bash and emailing it out using SWAKS or another program
1,437,580,070,000
How can I pass a full raw/MIME message (raw file) to the Linux mailx command for delivery? I don't want to extract the recipient, subject, body etc from the message - I want to feed a complete existing raw mail message 'as is' to mailx for sending whilst retaining all existing headers. An example message is as follows...
mailx -S smtp="backup-mail-server.com:25" < mailx -p -f /var/mail/nobody This will read the RAW mail file, and pipe it into your send.
Send raw message with mailx command
1,437,580,070,000
Good Day, I'm still new in Linux CLI and I'm using RHEL 6. I'm executing command for sending email via terminal. $ cat log.txt | mail -s "Logs" [email protected] Hosted by outlook365 When I try this command, nothing happens. No errors but nothing happens. Any tips? Thank you.
Check the /var/log/maillog to see the logs related to the email being sent. Are the logs logging any errors?
Executing command for sendmail not working
1,437,580,070,000
I usually configure exim4 and bsd-mailx to send mail, via GMail or Google Apps, on my Debian machines. I use a very simple mail sent by smarthost; no local mail Exim configuration. I've always tested mailx with the following command: /usr/bin/mailx -s "testing" "[email protected]" <<< "testing." sudo exim4 -qff -v ...
There's no -t option for bsd-mailx, it's a bug regarding that error message. You could pass recipient addresses as simple arguments to mailx. I suppose you are seeing delivery failure of a bounce mail: a mail to notify sender that develivery failure occured for a mail sent previously. Your first mail must have been s...
Can I specify a command line recipient using bsd-mailx and Debian 8?
1,437,580,070,000
I need to send an email from my Ubuntu 12.04 machine. I am using mailx command to do that. Below is the command I am using which works fine. echo "Test server started at `date +"%F %T"` on `hostname -f`" | mailx -r "[email protected]" -s "Test Email" "[email protected]" But when I get an email, I see in my From secti...
I believe mailutils doesn't support the -r option. Replace it with the heirloom-mailx package which does support the -r option (or use sendmail -r [or -f]). http://manpages.ubuntu.com/manpages/lucid/man1/mail.1.html -p, -r, --print, --read print all mail to standard output Install: sudo apt-get insta...
How to send an email using mailx so that From and To appear correctly in the email?
1,437,580,070,000
Usually I only get the terminal output You have new mail in /var/mail/$USER after running certain upgrades but I've started getting it every couple days after running other commands, seemingly at random. The new mail in /var/mail/$USER is always to akin to this: Message-Id: <E1YHfKT-0008LI-2d@debianator> From: root <r...
It sounds like when a cronjob creates output, and it gets mailed to you. I have no idea why this output is being mailed to you. But if you think it's from the script, maybe you could suppress the output: - if acpi -a | grep 'off-line' + if acpi -a | grep 'off-line' >/dev/null
Why do I get mail when I unplug my adapter?
1,437,580,070,000
I am using RHEL 6.4. I have a script which runs in bash. The script sends an email using the command: mailx -a report.txt "Monthly Report" "[email protected]" < messageBody.html where report.txt is a pipe separated text file. The size of this file is unknown; sometimes this file may contain just 10-15 records, on oth...
To check maximum size on systems using postfix as their mail transport agent, we can use the postconf command. postconf -d | grep message_size It will show you the size in bytes. To change the value, Run postconf -e 'message_size_limit = 20480000' To make the changes effective, restart Postfix afterwards: service p...
What is the maximum size for attachment using unix mailx
1,437,580,070,000
I am using uuencode with mailx to attach a zip file. In following code, the if block works perfectly and I get Deletions.zip as an attachment in the email. But, whenever the else block is executed I don't get the attachment but the binary code in the email body instead. Code (Perl code invoking linux commands): open(E...
It looks like the causing problem is being caused during looping of while cat /test/emailbody.txt; Remove the "," while printing in file. Following line of code has this problem: push @dzones, "No files have more than 20% deletions.\n\nPlease see attached for the deletions in different zones.\n\nThanks, Vishal\n\n";
Uuencode displaying attachment content in email body
1,437,580,070,000
Well I have searched some of the possibilities to install command line mail clients but there are no easy ways to install. Is this even possible without compiling the mail client ?
Funny thing, almost 3 years later I am unable to find any progres regarding answering that question, today at LibreElec. If it helps someone: to send an e-mail from my LibreElec Raspberry Pis, I ssh to my router and send an e-mail using the router. This is absolutelly the simplest solution. Actually, I consider that w...
Installing mailx on Openelec, Raspberry PI
1,437,580,070,000
I've to send a HTML file with mailx command but when I receive the email with the mark up code showed like this : <HTML><HEAD><TITLE>Title One /TITLE> <STYLE> body { width:900px; font-size: 10pt; font-family:verdana; .../... I used this command : cat file.html | mailx -r [email protected] -s "Suject" -S content...
My mailx version is : Heirloom mailx 12.5 This command solved my issue : (echo "Content-Type: text/html"; cat file.html ) | mailx -r [email protected] -s "Suject" -S content_type=text/html -S smtp=smtp.acme.com [email protected]
How to mailx working with Content-Type: text/html
1,437,580,070,000
How do I specify a default sender 'from:' address in postfix config for emails through smtp? I'm trying to send emails through SMTP and a relay from two different servers with Oracle Linux 8 The problem is that on one server when you send an email without the '-r' option to specify a sender it doesn't work returning t...
There are many versions of the mail program, including GNU mailutils and bsd-mailx. As mail on server2 seems to work correctly, make sure that server1 has the same version as server2. Use /usr/sbin/sendmail instead of mail to send your message. You're using postfix on both machines, and postfix's sendmail command u...
Oracle Linux postfix conf SMTP - Default sender 'from' issue
1,437,580,070,000
I'm trying to make a Bash function like this: function send_email { local DEFAULT_EMAIL='[email protected]' local email_subject="${1:-No subject line set, please check $0 on $(hostname -f)}" local email_from="${2:-$DEFAULT_EMAIL}" local email_to="${3:-$DEFAULT_EMAIL}" mailx -s "$email_subect" -r "$email_fro...
if dd of=stdindata iflag=nonblock >/dev/null 2>&1; then mailx -s "$email_subect" -r "$email_from" "$email_to" <stdindata else mailx -s "$email_subect" -r "$email_from" "$email_to" </dev/null fi
Function call with stdin or /dev/null if empty
1,437,580,070,000
On AIX, I want the mail program to use /root/.mbox instead of default /root/mbox. I edit mailrc vim .mailrc set MBOX=/root/.mbox the result is not good mail Mail [5.2 UCB] [AIX 5.X] Type ? for help. "/var/spool/mail/root": 2 messages 2 unread >U 1 root Tue Jun 22 01:48 13/349 U 2 root T...
Solution found, instead of use this method, valid on old Unix os like Sco Unix System V myname@scosysv:/usr/myname$ vi .mailrc ".mailrc" 1 line, 19 characters set MBOX=/usr/myname/.mbox myname@scosysv:/usr/myname$ echo hello|mail myname myname@scosysv:/usr/myname$ mail SCO System V Mail (version 3.2) Type ? for h...
Aix: why program mail ignore the mbox setting?
1,395,153,498,000
If I use a MBR partitioning scheme and create a primary or extended partition with fdisk(version 2.20.1), then it starts on sector 2048. If I remember correctly, then older versions of fdisk started the first partition on sector 63. If MBR needs only 512 bytes, then why doesn't the first partition start on sector 2? W...
The old 32KiB gap between MBR and first sector of file system is called DOS compatibility region or MBR gap, because DOS required that the partitions started at cylinder boundaries (and each cylinder had 64 sectors i.e. 64 sectors * 512 bytes/sector= 32KiB space). Legacy GRUB (GRUB1) could've used it to install GRUB1...
area on disk after the MBR and before the partition start-point
1,395,153,498,000
I have a CentOS 6 server with two hard drives in it. My old 3TB drive has been giving me some issues so I'm moving things over to a new drive. Because my / and /home partition are managed by a LVM it was easy to migrate those to the new drive. Now I want to move over my /boot partition and the MBR that makes it all...
If the two hard-disks are of the same size (or the new one is bigger), why didn’t you just copy the old disk to the new disk? I.e. dd if=/dev/sda of=/dev/sdb Now, if the new hard-disk is bigger, change the partition sizes with parted or gparted. All this done booting from a live CD/USB-stick.
Moving /boot and MBR to a new drive
1,395,153,498,000
I have an HDD (or SSD, or flash drive) with FreeBSD installed on it, and somehow I broke the bootcode (first 446 bytes of MBR). How could I boot into this FreeBSD?
Assuming that there is 512-byte DOS-like MBR, and you have replaced first 446 bytes of it with some crap (zeros or just /dev/urandom output), or damaged the bootcode some other way. In this case MBR partition table is on it's place, but system cannot boot from this device. Idea is to use other BSD-like system's loader...
How to boot FreeBSD system with broken bootcode?
1,395,153,498,000
I remembered reading one question how would you back up the MBR of a disk. Two of the choices are dd if=/dev/sda of=/dev/sdb bs=512 count=1 dd if=/dev/sda of=/dev/sdb bs=440 count=1 and the correct answer is dd if=/dev/sda of=/dev/sdb bs=440 count=1 I am confused. Is the MBR size 440B or 512B ?
The MBR IS 512 bytes. So the first example is how you would back it up. The partition table is at the end, in the area after 440 bytes in - so, if you wanted to back it up WITHOUT the partition table, then you could use the second example (why you'd want that, I don't know).
MBR size is 440 bytes or 512 bytes
1,395,153,498,000
I've been examining the Ubuntu 20.04 and Fedora 32 live images, and saw that the first (ISO 9660) partition is set to cover the entire image (at least on the MBR's partition table, didn't check GPT yet). For Ubuntu this is around 2.7 GB; for Fedora it's 1.3 GB. However, after copying these ISOs to a USB stick using dd...
We can say that it is a bug in gparted (and a corresponding bug in parted). These tools 'do not understand' the partition structure of iso files when cloned to USB pendrives (and other mass storage devices). You can look at the drive with modern versions of fdisk and lsblk and get better results. You can create a par...
Linux live USB - Why does ISO 9660 partition cover the entire USB stick?
1,395,153,498,000
I'm installing NixOs on a ThinkPad X220. Though I'm very comfortable in the shell, it's the first time I've set up my own system, and I'm running into some unknowns while trying to partition the hard drive with fdisk. The laptop currently has Windows installed, and I intend to replace it entirely with NixOS. I ran fdi...
ok, the quick answer is: Yes, you can remove the ntfs flag, which is a Windows thing, you won't need it when making your NixOs installation. The second question, well some people prefer GPT over MBR because you can create unlimited partitions on the disk... I use MBR and have 3 primary partitions (3 Linux distros) an...
fdisk: partition contains a ntfs signature. remove it?
1,395,153,498,000
I found lot of examples of MBR records on various systems, and they all have same structure, for example - as here. So - first 512 bytes must have a Code area, Disc signature and Table of partitions. My disk layout is: $ lsblk ...
You may have luck to see more information including partitions using file -k # Don't stop at the first match, keep going. Though on my systems it also does not show the partition table. (file 5.15 and 5.19). But I wonder why file should print the partition table at all. IMO file is supposed to show what kind of data ...
Where is partitions in MBR?
1,395,153,498,000
I have a Sony VIAO laptop setup as dual boot (Ubuntu 12.10/Windows 7). Since I wanted to try Archlinux, I installed VirtualBox in Ubuntu. To create a bootable USB stick (from the ISO image on my hard drive), I followed the instructions from archlinux installation guide. However, accidentally gave the following command...
Sorry, but you had a Sony VIAO laptop set up as dual boot. Here's why: dd didn't overwrite just the MBR (i.e. the first 512B sector) - that would be quite annoying, but still fixable. It also took good part of at least the first partition on your hard drive. Unless you had a very interesting setup with system partitio...
Overwritten MBR: Is partial/complete recovery possible?
1,395,153,498,000
I have one built-in hard disk /dev/sda which looks like this: Disk /dev/sda: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes ...
It is usually not installed there. Most of the time, GRUB (stage 1) is installed in the MBR only, on Linux. Although GRUB version 1 will always overflow a little in the 30 kB following the MBR (stage 1.5, i.e. filesystem drivers), with GRUB version 2, the code installed within the MBR can load some other and bigger c...
Where to find the VBR on the /dev/sda1 partition?
1,395,153,498,000
Under the MBR model, we could create four primary partitions one of which could an extended partition that's further subdivided into logical partitions. Consider this GPT schematic taking from Wikipedia: Partition entries range from LBA 1 to LBA 34, presumably we ran out of that space and I understand that's a fai...
128 partitions is the default limit for GPT, and it's probably painful in practice to use half that many... Linux itself originally also had some limitations in its device namespace. For /dev/sdX it assumes no more than 15 partitions (sda is 8,0, sdb is 8,16, etc.). If there are more partitions, they will be represent...
Are there extended partitions in GPT partition table?
1,395,153,498,000
Through some legacy code I'm using dd to save and restore (parts) of a bootsector after unzipping the .iso of the system onto the hard drive (from a live cd). I use the following command to save the mbr (first 446 bytes thus everything BUT the partition table): dd if=/dev/sda of=/mnt/mbr.bin bs=446 count=1 Then I res...
The MBR is basically a 512 byte segment on the very first sector of your hard drive and it is composed of 3 parts: the boot code (446 bytes long), the partition table (64 bytes long) and the boot code signature (2 bytes long). Not sure what went wrong on your side but this works for me: This will definetly backup the...
Using dd in order to save and restore a boot sector?
1,395,153,498,000
I'm looking at replacing my current MBR-partitioned 2 TB system drive with quite possibly a 3 TB drive. Copying the files should not pose a problem, but are there any gotchas to watch out for, particularly with regards to the boot loader, keeping in mind that MBR doesn't support anything more than 2 TB so I'll have to...
Grub2 supports GPT, so you'll have no problem booting from the new drive. Whether your BIOS can boot a GPT drive is a different matter. If you switch your BIOS from legacy mode to EFI mode, you'll need to install the grub-efi package. You'll need to install the bootloader on the new drive. The easiest way is to copy t...
Copying OS from one drive to another migrating from MBR to GPT - what to watch out for?
1,395,153,498,000
I currently have FreeBSD version FreeBSD 10.0-RELEASE. Installed using a ZFS root. I'm attempting to mount a MBR partitioned drive but I can't get the partition nodes, /dev/ada4p1, etc. The partitions are formatted to EXT2. Is there a kernel module or command I need to run to gain access to partitions on ada4? [root@c...
It seems your Linux formatted /dev/ada4 MBR disk is not recognized properly by FreeBSD geom driver. So it can be seen through the legacy fdisk utility, but not through gpart show ada4. It might be due to the fact that this ada4 device is obviously using some non-standard MBR extension to handle 2TB+ disks (2 partition...
How to create MBR partition /dev/ nodes FreeBSD for mounting
1,395,153,498,000
It seems as though I always have to install files to a --boot-directory when using grub-install. What if I already have existing grub files in /boot on my partitions? Shouldn't I just need to install the MBR parts of grub and point it to one of my existing partitions' /boot/grub? I was unable to find such an option. ...
When GRUB boots from a MBR, the number of legacy BIOS compatibility steps it needs to take at the beginning of the boot process means that the code actually in the MBR is only capable of loading one disk block whose LBA number is patched in to the MBR code at the time of installation. That block is usually the first b...
Grub: install only the MBR parts, not the boot directory?
1,395,153,498,000
I create a file of 100MB size, and using losetup assign it to /dev/loop0. Consequently I use fdisk to create an empty DOS partition table, and a new partition that spans the entire disk. One thing that is unusual to me and I cannot understand, is that the aforementioned partition begins at the 63rd sector; this implie...
The MBR partition format is three decades old, and subject to weirdness for historical reasons. Back then, the computer needed to know the geometry of the hard disk. How is data organized on a hard disk? In three dimensions: cylinder, heads and sectors. (Diagram by LionKimbro) The geometry was stored with maximum val...
Partition table consuming 32K of data?
1,395,153,498,000
I read an article on aligning file-systems on partitions and this said that: When manipulating MBR disks, be aware that the alignment of extended partitions is unimportant. These partitions hold one-sector data structures that define logical partitions, so in a real sense, extended partitions can't be properly ...
Alignment is important on partitions containing data, in order to maximise the chance that block operations will match whatever the underlying block structure is (4K on modern hard drives, more than that on flash-based drives). Extended partitions don't contain data, they're simply containers for logical partitions. T...
alignment of extended partitions
1,434,468,866,000
I've tried installing OpenSUSE 13.2, Debian 8/8.1 and Ubuntu 15.04 (all them amd64). Debian/Ubuntu won't show disks and OpenSUSE can't format the partitions created on them. During the install, OpenSUSE detects disks and even allow me to delete old partitions, create a new partition table,and to create new partitions....
I finally figured it out myself. Solution: First I booted OpenSUSE from USBKEY in UEFI mode. In the intaller partitioner, I removed all partitions in the SSD and HDD Then I created a new partition table for each disk, still using the partitioner. Booted up from Ubuntu 15.04 USBKEY installer and it finally could man...
Can't format HDDs and install linux to Dell hybrid ultrabook
1,434,468,866,000
I have a laptop for work. I originally had Windows 7 on it then I installed Linux Mint 17 to dual boot. During my installation of Mint 17 I accidentally installed GRUB on the wrong partition (sda2). Now when I try and log into Windows for my work, it brings me right back to the Grub boot screen. Is there any way to mo...
I have used this, http://www.supergrubdisk.org/rescatux/, in the past, I believe thats what your looking for, it allows you to choose which partition to install/repair grub on. It even has a option to restore windows master boot record. You could also try windows repair cd, heres a safe copy I have used myself, https:...
How to move GRUB installation to a different partition?
1,434,468,866,000
What is the difference between the GPT and the BIOS disc partitioning systems? when boot drive is below 2TB on a BIOS system or UEFI boot disabled grub on BIOS system with GPT partitioned needs an extra 1MB partition, I think this is somewhat messy.
You have four primary partitions and want to add a fifth... and you can't just redeclare them extended/logical because those need an extra sector for each partition. Also GPT has a backup at the end of the disk so if you ever lost a partition table to MSDOS and had to resort to TestDisk, with GPT you might be able to ...
Advantage of GPT over MBR partition table [closed]
1,434,468,866,000
When I run grub-install /dev/vda -v I see this line in the output: grub-mkimage --directory '/usr/lib/grub/i386-pc' --prefix '(,msdos1)/boot/grub' --output '/boot/grub/i386-pc/core.img' --dtb '' --format 'i386-pc' --compression 'auto' 'ext2' 'part_msdos' 'biosdisk' How do I configure GRUB to add specific modules i...
I assume you're asking for the information available in the man pages of grub-install: -d, --directory=DIR use images and modules under DIR [default=/usr/lib/grub/<platform>] ... --modules=MODULES pre-load specified modules MODULES So you can use --modules=btrfs on your grub...
Where does grub-install take the arguments for grub-mkimage from?
1,434,468,866,000
How to boot GPT based system to Linux and Windows? This is not a question of starting from a fresh GPT based system, but starting from a MBR converted to GPT based system. My Asus laptop initial setup, I disabled the Secure Boot Control, and I enabled [Launch CSM] (Compatibility Support Module) I partitioned my HD us...
As far as I know, Windows does not handle such a converted system disk as a special case once the conversion is done, so it should be treated exactly the same as a disk in a "fresh" GPT-based system. In particular, Windows imposes the limitation that GPT-partitioned system disks must always boot Windows in UEFI native...
MBR converted to GPT based system, how to boot Linux and Windows
1,434,468,866,000
I'm trying to understand the ms-dos partition table, and there's the following diagram: It comes from this site. Almost everything is pretty clear to me, but there's one thing I don't get. As you can see, the third partition is an extended partition, and it has several logical disks. The extended and primary entries ...
I made an 300MB extended partition with a 100MB logical partition; deleted just the extended partition; then recreated it - all with fdisk. At every stage I observed the first logical partition's EBR sector, and it turned out, that when fdisk creates the extended partition, it resets the first EBR. Then I re-created t...
How does system know where the first logical disk starts?
1,434,468,866,000
Currently dual booting Windows 8 and Linux Mint 14, sooner or later I will give more space to my Linux system. Is resizing my Linux partition from the beginning a safe operation ? If yes, could you provide the name of an utility that would help me achieve this ? I am asking this because systematically when I did that ...
gparted is a nice GUI tool for resizing partitions, or ext partitions at any rate. I have not tried it on NTFS filesystems, although apparently it can. So yes, you can resize now or later. Just backup your personal tish first, just in case. Of course, if you know what is good for you, you keep that backed-up anyway...
Can I safely resize my partition from its beginning?
1,434,468,866,000
I am reading through the UEFI standard. On page 115, section 5 it discusses the GPT disk layout. I'm a bit confused as to exactly how this works. From the below, it sounds like UEFI will ignore the MBR. A legacy MBR may be located at LBA 0 (i.e., the first logical block) of the disk if it is not using the GPT disk la...
So is this basically saying if you put the firmware in legacy boot mode, this is how to define an MBR which will play nicely with that legacy boot mode? Yes, it's possible to have a disk that's boot table in both BIOS and UEFI mode. Many tools to create a bootable USB stick can do that Am I correct in saying that i...
Can you use MBR with UEFI - a question about the UEFI specification
1,434,468,866,000
I have an ext4 partition backed up with dd on a MBR hard drive that I would like to restore to a new GPT hard drive. Can I just create an empty partition of the exact same size on that new GPT drive and overwrite that partition with the one I want to restore or I have to do something else because the partition was bac...
Can I just create an empty partition of the exact same size on that new GPT drive and overwrite that partition with the one I want to restore? Yes. The MBR/GPT distinction is metadata stored outside of the partition. So when you made a partition backup using dd you only backed up the content of that partition (t...
Using dd to restore a partition backup from MBR disk to GPT one
1,434,468,866,000
I have an img (made with dd) of a FreeBSD installation on a 1TB HD. This time i need to use a smaller disk (500GB), and of course if I try just to restore the same image it won't work, but even if I tried to manually adjust partition table and MBR my system doesn't boot. What i did: After dding, i went straight to sfd...
That seems slightly masochistic to me. Personally I would have done a dd for backup. Then I would shrink it and make sure it works before trying to move it (shrink->reboot->check->final dd). I assume that you had less than 500 GB of data. But you do not know how it was structured on the disk. You have then used sfdisk...
Shrink FreeBSD partition
1,434,468,866,000
I am using hexedit to show/edit disk MBR (512 Bytes, copied with dd). When I open the file, hexedit displays the file as 9 columns, 4 bytes per column (36 bytes per line). That is very unfortunate. I need to have it aligned in a meaningful way (ie 8 columns, 32 columns per line) I could not find any way to do it in th...
Apparently it keys off of the width of your terminal. If you size the terminal just right you can get hexedit to show you 8 columns instead of 9. Example 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................................ 00000020 00 00 ...
hexedit: change number of columns (bytes per line)
1,434,468,866,000
I've just installed my OSes on a new HDD: Windows 7 and Debian 7. As usual I first installed Windows, then Debian. At the first attempt, GRUB seems to not have been installed properly, because my computer would just boot into Windows. I found this on debian.org, so I followed its advice: When there is more than one d...
Assuming you're partitioning with MBR and not GPT. First, you can backup and eventually restore your mbr (assuming hda is the target disk): dd if=/dev/hda of=/path/mbr-backup bs=512 count=1 # backup dd if=/path/mbr-backup of=/dev/hda bs=512 count=1 # restore Obviously would be hda1 if you installed grub in the part...
Installing GRUB in a dual-boot
1,434,468,866,000
I have a hard drive which is encrypted using LUKS. It was originally an external hard drive. Recently I removed the casing and connected it directly (via SATA). However, when I connect it directly, I'm unable to view the partition, and it doesn't prompt for the password. Out of 4 TB, it shows an unknown partition of 5...
It's probably a problem with the sector size. Some USB enclosures claim their drives have 4KiB sectors, when the drive represents itself as 512 byte sectors or vice versa. Partition tables (both msdos and gpt) unfortunately depend on the sector size. If the sector size changes, the partition table becomes invalid. Now...
LUKS on an internal hard drive
1,434,468,866,000
I am trying to learn and especially understand how partitionning and boot-loaders work. The problem is that I got it all twisted in my mind. In the end I don't understand anything anymore. I know how to partition a hard drive using fdisk, parted, gdisk. I tried chainloading iso files (such as ubuntu.iso, arch.iso) wi...
1) What is wrong here, since syslinux is supposed to support ext2 partitions? Yes, Syslinux supports ext2 fs via Extlinux. If you are using a UEFI/EFI based system then you need a fat32 partition. For GPT only you don't need to have a fat32 partition, just go with the traditional. i.e. ext? 2) Do I have to install ...
Understanding syslinux and partitioning
1,434,468,866,000
I just installed a new SSD and I want to move all the files from the HDD to my SSD. I cloned the partitions from the hdd to the ssd. I run on a dual boot - windows 10 and ubuntu 15.10. So, now I have the exact same files on the ssd and hdd. What I want to do is change the MBR of the ssd drive and make it the default d...
I found what my problem was, I changed the efi -(hd0,gpt5) but I didn't change the UUID!!
changing grub boot drive
1,434,468,866,000
Is there a way to perform a safe reduce in rootlv at rescue mode? Most of the internet's explanations tells, basically, that it can be done using the following steps sequence: vgchange; fsck; resize2fs; lvreduce; reboot I tried it a several times; but all I get when system pass through POST is the same error: FATAL: I...
The steps I was doing were right at all. The problem was the way I was booting my system. BIOS found CentOS media, then installation menu has been shown to me. I was trying to boot choosing option "boot from hard drive" and after that I have received the error described before. I repeated the steps again, but from thi...
How to reduce ext4 rootlv on centos 6
1,434,468,866,000
As I understand it, the GRUB bootloader on a BIOS system (and most other bootloaders for that matter) are comprised of 3 parts. The first part (stage 1) is stored in the first 448 bytes, which is responsible for passing control to the so-called stage 1.5, located a little later in memory. This stage finally loads stag...
If you look at the sources of GRUB, available here, you find stage1 is actually defined at grub/grub-core/boot/i386/pc/boot.S. It can perform a floppy boot if configured. It does boot from a configured harddisk, and it needs to know which C/H/S it has to load stage1.5 from. The only automatic function it has is determ...
How does BIOS bootloader know which disk to use?
1,434,468,866,000
I was reading Linux boot process and stumbled upon below questions: When mbr gets write on first sector during installation.? 446 byte of mbr code will be same for either Linux or windows? How can the mbr know that where is my grub? I have gone through google but could not find any satisfactory answer.
The MBR gets written when Grub is installed, or when any other boot loader is installed What the MBR contains depends on the boot loader that is installed. If Grub is installed, it can be used to boot both Linux and Windows. Grub is (partially) installed in the MBR. The code in the MBR knows where to load the rest. ...
Question related to MBR
1,434,468,866,000
I am talking about disk signatures in context of the MBR. The area from 440 to 444 bytes. Let's say I got a bootable raw image (bootable in a virtual machine). How can I set the disk signature to a fixed (non-random) value while keeping the raw image bootable? How to automate (script) that? (If you are wondering if th...
Take your image, extract the first sector: dd if=image of=mbr.dat bs=512 count=1 write "AAAAA" to position 440-444 and do not truncate the file: echo -en "\x41\x41\x41\x41\x41" | dd of=mbr.dat conv=notrunc seek=440 bs=1 Use a hexeditor like okteta to verify that it did what you wanted. Then write it back: dd if=mbr....
How to change the disk signature of a raw image?
1,434,468,866,000
I had a Linux distribution which had installed grub on MBR. Then I installed second Linux distribtion on a different partition but did not install grub in it. Then I went to first Linux distribution and ran update-grub. So second Linux distribution also was picked up and is presented in menu at startup. Now I want to...
Reinstall from working (not liveCD/DVD/USB) system - first find Ubuntu drive (example is drive sdb but use your drive not partitions): sudo parted -l if it's "/dev/sdb" then just run: sudo grub-install /dev/sdb If that returns any errors run: sudo grub-install --recheck /dev/sdb Then just to redo menu: sudo updat...
Transferring Grub on MBR connection to different Linux distribution
1,434,468,866,000
I have a laptop, which has a 500GB hard disk and with MBR partition, and I install my windows8.1 on it, but I left ~75G unused which I would like to use it for OpenSuse13.1. Now I have 2 USB, one is Gnome Live 13.1, another is standard DVD install ISO. I tried to insert Gnome live 13.1 and no problems, it recognized m...
It sounds like you're either booting Windows 8.1 in legacy/BIOS/MBR mode (as opposed to EFI/GPT mode), or YaST is buggy and thinks that you have EFI booting enabled even though you don't. Another possibility is that your laptop's BIOS boots optical drives in EFI mode by default, causing YaST to load in EFI/GPT-only mo...
How to install after windows 8.1 with MBR partition
1,434,468,866,000
I am writing an update utility for an embedded Linux device for which I am responsible. I'm creating a basic side-by-side setup, where updates are applied to a staging partition and then the bootloader is switched to the staging partition, changing the primary partition into the new staging one. However, the embedded ...
Create a third, tiny, partition to hold your data. Any other location on your disk will sooner or later bring trouble if indeed you cannot rely on the filesytems. Sometimes the last few clusters of a disk cannot be addressed in the FAT entry, that may be an option but it heavily depends on exact size of the device. Do...
Location on disk to write a byte-flag?
1,434,468,866,000
I have a CentOS server on VMware that has, among others, a disk of 1.5TB, with a single xfs partition using the whole disk. This disk/partition is running out of space, so I need to increase its size to 2.5TB. So I increased the size on VMware and tried to delete and add the partition, which failed. Of course, the ori...
So you have one msdos partition that starts at sector 128. This is uncommon since the standard would be MiB alignment, starting at sector 2048 (for 512 byte logical sector size). With GPT, you can still use the start sector 128, that isn't a problem: # parted /dev/loop0 unit s print free Model: Loopback device (loopba...
Increase disk size and change from MBR to GPT
1,561,645,469,000
So, somehow the partition table on my disk went bananas: at the next boot the system would not start, I got repeatedly kicked in the BIOS and I had no viable boot options. The BIOS still detected the disks properly, so I started a LiveDVD to see what's going on. So, in the disk with the OS, /dev/sdb, 128GB SSD, there ...
Before you go any further create (dd) an image of the disk that you can use to restore it if things go badly wrong. It seems from your post that you have read the TestDisk guide. If not best to read it. Question 1 Testdisk should identify the available partition types automatically and the fact that it found an INTEL ...
Recovering lost partition table with TestDisk
1,561,645,469,000
There's a video driver problem with GPT, the Apple A1286 Mid-2010 MacBook Pro machines, and NVIDIA GT330M drivers, and running Nouveau has its own problems, so I want to install Cinnamon Mint 19.1 using MBR partitioning so I can use the proprietary drivers. It will be the sole OS on this PC. I had formatted the intern...
Installed OK on the MBR-partitioned drive in this 2010 MacBook Pro A1286 once I deleted the ext4 partition sda1 which had the entire drive created a 1MB partition at the front as sda1 for MBR use. Then, created an ext4 partition sda2 for the rest of the drive for root. Now, Mint 19.1 install is complete, and I can...
Want MBR install of Mint 19.1
1,561,645,469,000
I have an internal NoteBook HDD hooked up to a Linux machine externally via USB and want to check if this HDD has some sort of boot record on it. I have no access to BIOS and can not boot my device from this HDD externally I can not hook this HDD up internally to any machine at the moment Should there be a boot rec...
BIOS boot loader, MBR Please check the whole drive (point to the drive's head end), sudo file -s /dev/sdX sudo file -s /dev/sdb # example: device b Do not point to a partition, sudo file -s /dev/sdb5 # example: device b, partition 5 UEFI bootloader In UEFI mode the computer needs nothing in the boot sector at the...
How to find boot record of external HDD
1,561,645,469,000
I have a MBR table that have a few partition that was deleted previously. What are the ways to reassemble the MBR Partition entry and restore the deleted partitions without using 3rd party tools or software like testdisk.. etc.
Every filesystem has a signature. So if you know which filesystems were used on the partitions, then you can use a hex editor to open the block device and search for the filesystems. Filesystems tend to start at (or near) the beginning of partitions, so when you find the beginning of a filesystem there's a good chance...
Reassemble deleted MBR Partition
1,561,645,469,000
After installing Linux Debian on external HDD (not live Boot), is no booting possible. If I start the PC it automaticly jumps in grub-rescue. How should I fix it? On the Internal HDD is just Windows 10 installed. Thank you for your Help.
Answerer by Anwar on Askubuntu.com If you were able to boot Ubuntu in the past, but not now, follow these steps to solve the problem. First type ls command and Press Enter to see all the available partitions. The entries will be shown as (hd0,msdos1) (hd0,msdos2) (hd0,msdos5) etc. Then type ls (hd0,msdos1)/ to see th...
Boot problems after installing Linux Ubuntu [closed]
1,561,645,469,000
I'm trying to understand the partition table of my MTK-6572 based android smartphone (Karbonn-A35). The idea is to enlarge the internal Storage partition (mounted as /data) and correspondingly shrink the Phone Storage partition (mounted as /mnt/sdcard), so that I can install more apps on the phone without getting the ...
Extended boot records only need contain two values, and your EBRs probably do. The second entry in an EBR points to the next EBR (unless it is the last one in the chain). Your disktype utility walks the chain of three EBRs and display each of the entries as if they were a multiple entry MBR. (This is explained in the ...
A basic query about Linux partitioning
1,561,645,469,000
I ran fdisk with these options, fdisk -H 32 -S 32 /dev/sdc Then I made a new label, and created an aligned first partition. Disk /dev/sdc: 7743 MB, 7743995904 bytes 32 heads, 32 sectors/track, 14770 cylinders, total 15124992 sectors However when I run, fdisk -l /dev/sdc My heads are reported at 16, like this, Disk ...
Units = sectors of 1 * 512 = 512 bytes Your partition starts at (Start) 8192 × (Unit size) 512 = 4MiB I don't know what your intention was, but it doesn't look too bad as it is on a 32×32-boundary too (4096). Don't know why fdisk says 16, but it looks all right to me. Maybe check the manual page man fdisk for more det...
Fdisk partition alignment, NAND, not showing specified heads
1,561,645,469,000
After installing Linux on a computer (Debian in particular), should I bother backing up the MBR or the GPT and use something like monit to periodically compare the MBR/GPT against this backup? Is this worth the trouble, or is there any better way, or is it not applicable anymore? I recall in the past about boot sector...
The EFI/GPT partitioning scheme cannot contain malware, so it's not necessary. Monitoring changes in it is still a welcome security measure in case a possible intruder will want to mess with your partitions. With EFI/GPT the system boots from the EFI System partition (FAT32/FAT16) and binary files on it must remain th...
Backing up MBR/GPT for detecting boot sector viruses
1,561,645,469,000
Is there any command to list all partition type codes recognizable by currently installed distribution (In my case Ubuntu 18.04.03 LTS) I know the following website exists Andries E. Brouwer 1995-2002 - homepages.cwi.nl yet there should be any command inbuilt in the linux console. I know that cgdisk shows all partitio...
Ok finally I found that it's mainly dependent of the filesystem and the volume identification hex code is/should be present in the filesystem documentation as seen below for NTFS and EXT4 Conclusion: There is not specific command or tool only for listing partitions hex code besides the function of cgdisk, gdisk, cfdi...
Command to list partition type codes in deb and rpm distributions for MBR and GPT
1,561,645,469,000
My system was dual booted with CentOS 7 and Windows 8. After I reinstalled the latest Windows 10 Pro and removed windows 8, my system is only booting with Windows 10 as the Grub2 is not appearing at the boot time. I assume Grub2 is over written by Windows MBR. I might need to reinstall grub on my system. I don't have...
The solution was simple with the below steps. Booted my system with CentOS 7 disk into a rescue mode. Now mount my root partition by running the chroot command as follows. chroot /mnt/sysimage Then I installed MBR with the below command. grub-install /dev/sda after installing the grub boot loader I rebooted th...
CentOS 7 grub option is missing after upgrading windows 8 to 10
1,561,645,469,000
I have tried installing Arch Linux and what I ended up with was a partition scheme like this: /dev/sda: /dev/sda1 NTFS partition (Windows 7) /dev/sda2 ext4 (Arch) /dev/sda3 swap I don't know why, but for some reason I have been unable to mount the NTFS partition under Linux. It's worth mentioning that the first...
This is utterly strange, but I have solved my problem. As I'm not sure what exactly solved the issue, I'll describe what happened. First of all, I tried to access the partition from Arch Linux, which was installed on the same drive. This didn't work; I deleted the Linux partitions; I've unplugged the computer from th...
Recover Windows partition in a GPT disk (previously MBR)
1,561,645,469,000
Trying to clean the mbr code part on a disk using the pfsense 2.7.0 live disk (pfsense is based on freebsd) under shell command. being /dev/da0 my drive following the suggested code for clean just the mbr code keeping the partitions the command should be: dd if=/dev/zero of=/dev/da0 bs=446 count=1 however... the resu...
Ok, I did many test and came to this conclusion... Because pfsense is a damn stripped version of freebsd and LOT of tools are missing I had to do this to clear the first 446 byes in the disk preserving the partition table located at the latest 66 bytes of the first 512 bytes block. dd if=/dev/da0 of=/tmp/mbr_file_orig...
using dd for clean MBR code doesn't work on pfSense
1,561,645,469,000
Inspired by UEFI, I want to skip the stage of the bootloader (grub, lilo, syslinux) and boot linux directly. Is this possible? Cant I just boot the kernel directly, or have a minimalistic bootloader that fits in the MBR?
The space available in the MBR itself is tiny. (About 400 bytes or something.) That's way too small to fit an entire filesystem driver. Without a filesystem driver, there's no way to figure out where on disk the kernel is stored, and hence you can't load the kernel. You could try hard-coding the location of the kernel...
Is there a way to boot linux directly from MBR?
1,561,645,469,000
Has anyone tried updating to Windows 10 on a dual boot machine? I'm concerned that Windows 10 might mess with the MBR. Is there a way to preserve the MBR and easily restore it if Windows in fact changes it? The other OS on the dual boot is Lubuntu.
You can save your MBR to a file using dd dd if=/dev/sdX of=~/MBR.backup bs=512 count=1 Where X is the device you want the backup from. Mind the if parameter it is the device (sda) not the partition (sda1,sda2,sdb1, etc...)
How to back up a MBR
1,561,645,469,000
I'm analyzing a compact flash using fdisk and by comparing it to the contents of the partition table on the CF's master boot record. I don't understand what the "Start" and "End" columns mean. Some of the documentation that I read says that it means the starting sector and ending sector of that partition, but when I...
CentOS 6's fdisk still defaults to using cylinders as the default units when displaying the partition table. As commented by zevzek, this is obsolete and you should use fdisk -u=sectors -l to better match the reality of modern storage devices and also how later versions of fdisk display it by default. The CHS values i...
What does fdisk's Start and End values mean when looking at a compact flash
1,561,645,469,000
I am partitioning an external 1TB HDD for a small embedded Linux system. I want to encrypt the swap partition. According to the cryptsetep FAQ, you need to use kernel device names (/dev/sda, etc) in /etc/crypttab: Specifying it directly by UUID does not work, unfortunately, as the UUID is part of the swap signature a...
Partition numbers cannot conflict. Physically cannot. The partitions are recorded in a Partition Table, special place in the 0-block of the disk. These records are not a named records, they are placed in an array. The index in that array (plus one) later become a number in the list of partitions you see in terminal. R...
Do MBR partition numbers need to be contiguous?
1,561,645,469,000
I am trying to better understand disks, partitions, and partition tables (mbr vs gpt). In the process I checked the disks on one of my machines (single boot ubuntu 20.04), and found that all of my disks are gpt. However I also found out that some of the partitions have a partition table too. What got me even more conf...
Yes, its possible. "Instead of a primary partition, you can also define (exactly) one extended partition in the primary boot sector that contains all the disk space that is not allocated to any primary partition. In the extended partition further logical partitions can be set up, which in principle are structured in t...
Can a disk partition have another nested inside it?
1,561,645,469,000
When GPT is used partition ID can be set with sgdisk $ sgdisk --partition-guid=1:"00000000-0000-0000-0000-000000000000" "/dev/vda" $ readlink -f /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000 /dev/vda1 How can I use a predefined partition id with MSDOS partition table?
$ ID=00000001 # Disk identifier $ ( echo x # Expert mode echo i # Change disk indentifier echo 0x"$ID" # New identifier echo r # Return echo w # Write echo q # Quit ) ...
sfdisk/parted: predictable/predefined partuuid for msdos partition table
1,632,160,214,000
I'm trying to understand where GRUB stage 2 is located on my bootable compact flash. Below is the output of the file command which was run against an image of the MBR (first 512 bytes) of the compact flash. It says that the stage 2 address is 0x2000, or in decimal 8192 which would put it at the 16th sector ( 8192 Byt...
Since the output mentions stage1 and stage2, we're talking about GRUB Legacy (i.e. GRUB version 0.97 or older) here. Modern versions would have a "core image" and a set of modules instead. stage2 address and stage2 segment don't refer to disk sectors; they refer to the memory address stage 2 will be loaded to. The add...
Where is GRUB stage 2 located on my bootable compact flash, according to the Master Boot Record?
1,632,160,214,000
I'm a dual boot user running Windows 10 and Kali linux. I rebuild the MBR by mistake using partition wizard. Now I lost access to my linux I lost swap area menu but I still have the partition I tried to use easy BCD but it didn t work
Boot linux live chroot in root repair grub
Accidentally modified MBR; can't boot to Linux anymore
1,632,160,214,000
I have a NTFS hard drive internally attached to my computer and it's causing problems with the other Windows installation on my dual (or triple?) boot machine. I'm not sure if the partition scheme is GPT or MBR, but how can I create a backup of the partition table using dd and then wipe it from the drive so it isn't r...
To backup DOS label (MBR) use this: dd if=/dev/sdX of=mbr bs=512 count=1 To backup GPT label use this: dummy=$(parted -ms /dev/sdX print | tail -1| cut -b1) size=$((128 * dummy + 1024)) dd if=/dev/sdX of=gpt bs=1 count=$size To wipeout the labels use this: dd if=/dev/zero of=/dev/sdX bs=Y count=Z partprobe /dev/sdX ...
Backup and then wipe partition table from head of drive
1,632,160,214,000
I wanted to upgrade my 1.5TB HDD to a 4TB SSD, none of the internet resources I found correctly matched my situation from beginning to end, and I ended up spending about 20 hours getting it to work, so I'm compiling my findings here for future travelers.
Base details: I have an old Dell Inspiron 5720 running Ubuntu 20.04.6. I started with a 1.5TB HDD and bought a 4TB SSD. I discovered that MBR, the partition table my old drive used, did not support partitions larger than ~2TB, so I was going to have to switch to GPT. Apparently this almost inevitably entails switch...
Convert MBR/BIOS to GPT/UEFI (infodump)
1,632,160,214,000
Long ago I've installed Windows 7 in legacy (BIOS) mode with MBR (why? who knows) and made 4 primary partitions, one for Windows and the others for files. Later I've changed one primary into logical and installed linux dualboot. I use GRUB2 to launch OS. And since then I've also got second HDD which doesn't have any O...
Later I've changed one primary into logical and installed linux dualboot. Primary would have been also good. I always used as many primary partitions as possible and if I needed more partitions, I changed the 4th primary into an extended partition with logical partitions inside. should I change another primary into...
Does BIOS MBR limit linux distros installments?
1,632,160,214,000
I installed a triple boot system (Windows 10 Home 21H1/Windows 7 Pro/Debian 11), on three different partitions on a partitioned disk in MBR, and at boot I can start each system without problem. But in GRUB menu all the Windows systems are accessible from a single entry named "Windows 10" (in reason of the first instal...
Your GRUB ntldr command is currently looking for a file named bootmgr on the second partition of the first HDD, but that file does not exist there. Windows 10 and Windows 7 can both use the same Windows Boot Manager: in your system, they are currently configured to do just that, and the boot manager is configured to p...
Triple boot MBR with GRUB avoid Windows Boot Manager
1,632,160,214,000
I recently broke the screen of my Lenovo Ideapad 110S-11IBR, so I decided to use it as a NAS device. After I tried to install a Debian-based NAS operating system I ran into a problem: Even though the installation was successful, when I tried to boot, the system could not detect any OS. I used a partitioning tool's liv...
In the question comments, you confirmed that the internal 32 GB disk is actually a SD/MMC card. The presence of "Windows Boot Manager" indicates the system is UEFI capable, and that Windows was installed to boot in UEFI mode. Perhaps the laptop is currently configured to prefer booting in legacy BIOS-compatible mode (...
How can I properly install Debian on a laptop that used to have windows? (There is probably a problem with MBR)
1,632,160,214,000
System: Linux Mint 20 x64 cinnamon booted on mbr formatted disk. I inserted a new hdd containing a gpt and a ntfs partition (next to a small MSR partition, which doesn't matter here I guess). GParted detects the hdd but the mount option is greyed out. Why is that? And what can I do to mount this partition?
Like suggested in the comments the problem was indeed the hybernation flag. The ntfs-3g driver cannot safely mount the ntfs disk as Windows is in a hybernation state. This article explains it perfectly: all-explaining article some possible solutions: if you have access to Windows: boot into windows and do a normal sh...
Can I mount a gpt disk with ntfs partition on an mbr booted linux system
1,632,160,214,000
I am using Windows 10, Ubuntu and Debian 10 in my machine. Everything was fine untill some Debian update (or so as I think). Now when i restart my system only a underscore is displayed on my screen for 2-4 minutes and then the grub list of OSs appears. I thought something was wrong with my HDD so i booted in windows ...
So... After everything i booted into windows and saw something, that's when it clicked me. Basically, when i saw windows was booting perfectly and grub was delaying, it implied that my HDD and BIOS were absolutely fine. Also my GRUB was fine too because i literally installed another OS with new grub and all. The fault...
Grub menu taking too long to appear [closed]
1,632,160,214,000
I want to configure OL6 kickstart to install a system that boots from BIOS but uses GPT partitioning instead of MBR, even for disks <2TB. The relevant part of my kickstart file looks like this ($ROOTDRIVE has been correctly initialized): %pre parted -s $ROOTDRIVE mklabel gpt bootloader --location=partition --append="...
Newer versions of kickstart have a --disklabel flag for the clearpart option that can be set to gpt. It appears this was added in Fedora21/RHEL7 so I am not sure if it is available in OL6. There is an older flag to clearpart, --initlabel, that mentions it "initializes the disk label to the default for your architec...
How to force GPT partitions in kickstart for Oracle Linux 6
1,632,160,214,000
I have Debian Linux and Win7 installed on the one machine with grub loader and I need to load Windows 7 from partition with Virtual Box. Here my partiotions: # VBoxManage internalcommands listpartitions -rawdisk /dev/sda Number Type StartCHS EndCHS Size (MiB) Start (Sect) 1 0x07 0 /32 /33 12 ...
I just try to load without mbr, but with grub loader installed on my machine (partition number 5, I think): VBoxManage internalcommands createrawvmdk -filename /home/tanya/vb/win.vmdk -rawdisk /dev/sda -partitions 1,3,5 And it works!
Boot Windows 7 from partition on Linux: BOOTMGR is missing
1,632,160,214,000
I am trying to install Qubes OS Linux on my Mac mini. However I want to install it in a MBR configuration on a separate internal HDD. Is there a way to configure a mac to boot a MBR disk instead of UEFI?
I think you mean "GPT" instead of UEFI. UEFI is a type of firmware interface capable of running a bootloader, GPT/MBR are disk partition table types. Now to actually answer your question: Yes, you sure can. However, editing UEFI boot entries is a bit fiddly on a Mac, as I don't believe it follows UEFI standards. As...
Boot MBR on Mac mini